public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* "test" producing unexpected results after "chmod"
@ 2018-12-23  6:15 Steven Penny
  2018-12-23 17:12 ` Marco Atzeri
  2018-12-23 23:05 ` Andrey Repin
  0 siblings, 2 replies; 3+ messages in thread
From: Steven Penny @ 2018-12-23  6:15 UTC (permalink / raw)
  To: cygwin

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-12-23 22:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-23  6:15 "test" producing unexpected results after "chmod" Steven Penny
2018-12-23 17:12 ` Marco Atzeri
2018-12-23 23:05 ` Andrey Repin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).