Making file's mode 000 on cygwin - does not work

1

Seems cygwin is unable to cancel a file readability mode, viz.:

$ echo "123" > ttt

$ cat ttt
123

$ ls -ls ttt
1 -rw-r--r-- 1 Administrator None 4 Mar 22 10:19 ttt

$ chmod 000 ttt

$ ls -ls ttt
1 ---------- 1 Administrator None 4 Mar 22 10:19 ttt

$ cat ttt
123

$ 

Namely, even when ttt's mode is changed to 000, one can still read the file.

Any ideas how to make chmod on cygwin behave as expected?


Environment:

  • CYGWIN_NT-6.1-WOW64 1.7.33-2(0.280/5/3) i686
  • Windows 7

boardrider

Posted 2015-03-22T08:29:50.470

Reputation: 615

chmod 0 works for me in Cygwin. If you're running Cygwin as Administrator, then, arguably, this is correct behavior; after all, root can read files with a mode of 0. – Scott – 2015-03-22T10:55:58.797

No answers