On Wed, Apr 7, 2021 at 11:47 PM Orgad Shaneh <org...@gmail.com> wrote: > > Hi, > > If a filesystem is mounted with noacl, calling chmod to add write > permissions after umasking this permission doesn't work. Demonstrated > with command-line and C++. > > Did I miss something or is this a real bug? According to umask man, it > should only affect newly created files and directories, but I didn't > find anything that relates to chmod. > > Command-line: > touch foo > ls -l foo > # -rw-r--r-- ... foo > umask 200 > chmod 0 foo > ls -l foo > # -r--r--r-- ... foo > chmod 200 foo > ls -l foo > # -r--r--r-- ... foo > # Expected to have rw
Marco Atzeri replied to the mailing list but did not CC me, so I didn't receive it: > without ACL you can not expect the POSIX scheme to properly work. > see > https://cygwin.com/cygwin-ug-net/ntsec.html > to understand how Cygwin uses ACL to mimic POSIX permissions Thanks Marco! I'm well aware of that. I don't expect it to work properly. From what I know, it can only set/unset user write bit. Read bits are always enabled, even on chmod 0. What I do expect is that the write bit will not be affected by umask. umask should only affect newly created files, not direct chmod commands. - Orgad -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple