Read on full site | Join TechSpot! (it's free) | Bookmark / Share this



Cygwin access denied

jobeard
03-31-2008, 04:42 PM
On XP/Pro, \cygwin\bin\sed.exe gets Access Denied; Why?

what am I missing?

Jeff@ltbeard /usr/bin
$ sed.exe -h
bash: /usr/bin/sed.exe: Permission denied

yet cygwin perms are correct
$ ls -l sed.exe
-rwxrwxr-x 1 nMaster Users 97280 Aug 2 2006 sed.exe

and XP ACLs look good (to me at least)
C:\cygwin\bin>cacls ..
C:\cygwin BUILTIN\Administrators:(OI)(CI)F
NT AUTHORITY\SYSTEM:(OI)(CI)F
<Account Domain not found>F
CREATOR OWNER:(OI)(CI)(IO)F
BUILTIN\Users:(OI)(CI)R
BUILTIN\Users:(CI)(special access:)
FILE_APPEND_DATA

BUILTIN\Users:(CI)(special access:)
FILE_WRITE_DATA

C:\cygwin\bin>cacls .
C:\cygwin\bin BUILTIN\Administrators:(OI)(CI)(NP)F
BUILTIN\Users:(OI)(CI)R
BUILTIN\Administrators:(OI)(CI)F
NT AUTHORITY\SYSTEM:(OI)(CI)F
LTBEARD\Jeff:F
CREATOR OWNER:(OI)(CI)(IO)F
BUILTIN\Users:(OI)(CI)R
BUILTIN\Users:(CI)(special access:)
FILE_APPEND_DATA

BUILTIN\Users:(CI)(special access:)
FILE_WRITE_DATA



C:\cygwin\bin>cacls sed.exe
C:\cygwin\bin\sed.exe LTBEARD\nMaster:(special access:)
STANDARD_RIGHTS_ALL
DELETE
READ_CONTROL
WRITE_DAC
WRITE_OWNER
SYNCHRONIZE
STANDARD_RIGHTS_REQUIRED
FILE_GENERIC_READ
FILE_GENERIC_WRITE
FILE_GENERIC_EXECUTE
FILE_READ_DATA
FILE_WRITE_DATA
FILE_APPEND_DATA
FILE_READ_EA
FILE_WRITE_EA
FILE_EXECUTE
FILE_READ_ATTRIBUTES
FILE_WRITE_ATTRIBUTES

BUILTIN\Users:R
Everyone:R
BUILTIN\Users:(special access:)
WRITE_DAC
SYNCHRONIZE
FILE_WRITE_DATA
FILE_WRITE_EA
FILE_EXECUTE
FILE_WRITE_ATTRIBUTES
So why the permission errors?

(and yes, I've reinstalled it twice; first just overlay the program,
second, delete the program first (to clear the ACL) and then reinstall -- same error :( )

Nodsu
04-01-2008, 04:45 AM
It could be any of the DLLs or data files that sed is trying to access. Maybe run the file monitor from sysinternals and see which file access is denied.

Ad
04-01-2008, 04:45 AM
  

jobeard
04-01-2008, 11:16 AM
It could be any of the DLLs or data files that sed is trying to access. Maybe run the file monitor from sysinternals and see which file access is denied.
even just SED -H is denied, so it's not a data file. I fetch the F.M. and try that :)

Nodsu
04-02-2008, 11:50 AM
Also, I forgot the cool Linux (also in Cygwin) utility called strace that shows you what system calls a program uses and the results of these.

jobeard
04-02-2008, 12:53 PM
cool -- I forgot that too. However ...
$ strace -d -o ./strace.log /usr/bin/sed.exe
strace: error creating process C:\cygwin/bin\sed.exe, (error 5)
while tracing LS works perfectly!

The puzzle continues ...

jobeard
04-03-2008, 01:59 PM
filemon results
09:50 bash.exe:1856 FASTIO_QUERY_OPEN C:\cygwin\bin\sed.exe SUCCESS Attributes: A
09:50 bash.exe:1856 IRP_MJ_CREATE C:\cygwin\bin\sed.exe SUCCESS Options: Open Access: 00020080
09:50 bash.exe:1856 IRP_MJ_QUERY_INFORMATION C:\cygwin\bin\sed.exe SUCCESS FileNameInformation
09:50 bash.exe:1856 IRP_MJ_QUERY_VOLUME_INFORMATION C:\cygwin\bin\sed.exe SUCCESS FileFsVolumeInformation
09:50 bash.exe:1856 IRP_MJ_QUERY_INFORMATION C:\cygwin\bin\sed.exe SUCCESS FileAllInformation
09:50 bash.exe:1856 IRP_MJ_QUERY_SECURITY C:\cygwin\bin\sed.exe BUFFER OVERFLOW


while other IRP_MJ_QUERY.. complete ok
09:50 bash.exe:1856 IRP_MJ_CREATE C:\cygwin\bin\sed.exe SUCCESS Options: Open Access: 001000A1
09:50 bash.exe:1856 IRP_MJ_QUERY_INFORMATION C:\cygwin\bin\sed.exe SUCCESS FileNameInformation
09:50 bash.exe:1856 FASTIO_QUERY_BASIC_INFO C:\cygwin\bin\sed.exe SUCCESS Attributes: A
09:50 bash.exe:1856 FASTIO_QUERY_STANDARD_INFO C:\cygwin\bin\sed.exe SUCCESS Length: 97280
09:50 bash.exe:1856 IRP_MJ_QUERY_INFORMATION C:\cygwin\bin\sed.exe SUCCESS FileNameInformation
09:50 bash.exe:1856 FASTIO_QUERY_OPEN C:\cygwin\bin\sed.exe SUCCESS Attributes: A
09:50 bash.exe:1856 FASTIO_QUERY_STANDARD_INFO C:\cygwin\bin\sed.exe SUCCESS Length: 97280
09:50 bash.exe:1856 FASTIO_QUERY_STANDARD_INFO C:\cygwin\bin\sed.exe SUCCESS Length: 97280
09:50 bash.exe:1856 IRP_MJ_QUERY_INFORMATION C:\cygwin\bin\sed.exe SUCCESS FileNameInformation
09:50 bash.exe:1856 IRP_MJ_CREATE C:\cygwin\bin\sed.exe SUCCESS Options: Open Access: Read
09:50 bash.exe:1856 FASTIO_QUERY_STANDARD_INFO C:\cygwin\bin\sed.exe SUCCESS Length: 97280
09:50 bash.exe:1856 IRP_MJ_READ C:\cygwin\bin\sed.exe SUCCESS Offset: 0 Length: 8192
09:50 System:4 IRP_MJ_CLOSE C:\cygwin\bin\sed.exe SUCCESS


is a puzzlement! (from the King & I)

jobeard
04-07-2008, 02:18 PM
I found a static linked version of sed in an archive name UnxUtils.zip

I extracted ONLY sed.exe, stored it into /usr/local/bin and verified that it would run.
rm -i /usr/bin/sed.exe then cleaned up the issue.

I had previously attempted to reinstall sed frm the cygwin setup service, but to no avail, so I was forced into this approach.

It drives me nuts to not understand what caused this, but sometimes you just have to move on :)

Post a reply, see related topics & more

Tip: Download Advanced SystemCare 3 Free - Clean, Repair, Protect & Optimize your PC.



 Top Technology News

TechSpot Blog: Disable Windows automatic check for solutions after a program crashes

Weekend Open Forum: Google Chrome OS and the future of cloud computing

Tech Tip of the Week: Unearth Region-Specific Windows 7 Themes

Weekend tech reading: How to run Chrome OS as a virtual machine

Sony: PlayStation 3 to be 3D-capable via firmware update

iSuppli: DDR3 to account for over half of DRAM shipments by Q2 2010

Facebook named third most popular video website behind YouTube and Hulu

Patriot introduces new PS-100 SSD series

More Tech News

  
 Software Downloads

Norton Virus Definitions 2003-07 November 20, 2009

AVG Anti-Virus Updates November 20, 2009

Norton Virus Definitions 2008-09 November 20, 2009

avast! Virus Definitions November 20, 2009

McAfee SuperDAT Update 5808

Kaspersky Anti-Virus Update November 20, 2009

Google SketchUp 7.1.6087

More Downloads



Copyright © 1998-2009 TechSpot.com. TechSpot is a registered trademark. All Rights Reserved.