This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

"test" producing unexpected results after "chmod"


With Linux, these commands produce expected results:

   $ cd /tmp
   $ touch alpha.txt
   $ test -r alpha.txt; echo "$?"
   0
   $ chmod -r alpha.txt
   $ test -r alpha.txt; echo "$?"
   1
   $ chmod +r alpha.txt
   $ test -r alpha.txt; echo "$?"
   0

However with Cygwin, unexpected results are produced:

   $ cd /tmp
   $ touch alpha.txt
   $ test -r alpha.txt; echo "$?"
   0
   $ chmod -r alpha.txt
   $ test -r alpha.txt; echo "$?"
   0

It seems Cygwin is not able to produce non-readable files.


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]