This is the mail archive of the
cygwin
mailing list for the Cygwin project.
"test" producing unexpected results after "chmod"
- From: Steven Penny <svnpenn at gmail dot com>
- To: cygwin at cygwin dot com
- Date: Sat, 22 Dec 2018 21:59:07 -0800 (PST)
- Subject: "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