chmod works only for cygwin processes
Magnus Svensson
msvensson@mysql.com
Thu May 4 12:08:00 GMT 2006
Hi,
I'm experiencing a problem that a file that I make "chmod -r" on from a
perl script(or manually as you can see below) is readable from a windows
process. I.e the chmod seems to work only for the cygwin programs.
Here is what I do to reproduce it:
# Create a test directory
mysqldev@win2003-x86:~> mkdir test
mysqldev@win2003-x86:~> cd test
mysqldev@win2003-x86:~/test> mkdir testdir
mysqldev@win2003-x86:~/test> ls -l
total 0
drwxrwxrwx+ 2 mysqldev None 0 May 4 13:44 testdir
# Remove read access from the directory
mysqldev@win2003-x86:~/test> chmod -r testdir
mysqldev@win2003-x86:~/test> ls -l
total 0
d-wx-wx-wx+ 2 mysqldev None 0 May 4 13:44 testdir
mysqldev@win2003-x86:~/test> ls -l testdir
ls: testdir: Permission denied
# Now I pipe "dir test" to windows cmd.exe and it can read it.
mysqldev@win2003-x86:~/test> echo 'dir testdir' | cmd.exe;
Microsoft Windows [Version 5.2.3790]
(C) Copyright 1985-2003 Microsoft Corp.
C:\cygwin\home\mysqldev\test>dir testdir
Volume in drive C has no label.
Volume Serial Number is 749A-DF8B
Directory of C:\cygwin\home\mysqldev\test\testdir
05/04/2006 01:44 PM <DIR> .
05/04/2006 01:44 PM <DIR> ..
0 File(s) 0 bytes
2 Dir(s) 12,312,645,632 bytes free
# cleanup
mysqldev@win2003-x86:~/test> chmod +r testdir
mysqldev@win2003-x86:~/test> cd ..
mysqldev@win2003-x86:~> rm -rf test
Please advice what I can do or try?
Attaching the above steps as a small script as well as the output from
cygcheck -srv.
Best regards
Magnus
--
Magnus Svensson, Software Engineer
MySQL AB, www.mysql.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: chmod_problem.sh
Type: application/x-shellscript
Size: 303 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20060504/28ab3c11/attachment.bin>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: cygcheck.out
URL: <http://cygwin.com/pipermail/cygwin/attachments/20060504/28ab3c11/attachment.ksh>
-------------- next part --------------
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
More information about the Cygwin
mailing list