ls not in sync with chmod (weird problems with file permissions)

diod lightbulb greendiod@gmail.com
Mon Feb 9 15:37:00 GMT 2015


HI all,

Maybe this is a regression. This is linked to the problem reported in
this other thread https://cygwin.com/ml/cygwin/2015-02/msg00100.html .
I took notice of
it right after I updated cygwin (setup.exe 2.867) today.

My umask is 022. The drives are NTFS. CYGWIN is set to ntsec even if I
just saw today that it is obsolete by now (I also tried setting acl in
/etc/fstab but it didn't change the weird behavior described below).


1-  For pre-existing files/directories under /cygdrive/d and /cygdrive/e
All my file permissions that were correctly reported by ls -l as
rw-r--r-- became all of a sudden -rw-rwxr--+ ??? The same for
directories where all previously 755 dirs came back as drwxrwxr-x+


2- I tried to see what happened with a newly created file

% cygcheck --version
cygcheck (cygwin) 1.7.34

% cd /cygdrive/d/foo
% touch buggy
% ls -l buggy
-rw-rwxr--+ 1 green Users 0 Feb  7 20:07 buggy*
% stat -c " %a %u %g" buggy
 " buggy 674 1000 545

What the hell? I expected 644.

% chmod 644 buggy
% stat -c " %a %u %g" buggy
 " buggy 674 1000 545

Oooch, no change??? chmod used to work before today (BTW, same
behavior for pre-existing files: chmod has no effect).


Worse, using secaudit, I now get

% secaudit -v buggy
secaudit 1.4.1 : NTFS security data auditing
[snip]
Interpreted Unix owner 1000, group 0, mode 0777

What? 0777 ????

Bizarrely:
% chmod g-w buggy; secaudit -v buggy reported 0677 while ls -l
reported no change whatsoever!!


3- Under my home directory (which is also on the D: drive), everything
seems to be fine (for both pre-existing files/directories and newly
created files)

% cd ~; touch doinfine; ls -l doinfine reports rw-r--r-- and secaudit
as well as stat report a 644 mode.

So I still have the expected (and desired behavior) right under my
home directory but nowhere else (even on the same drive).

This is really annoying, hope someone can investigate into this.

Regards,
Green

--
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



More information about the Cygwin mailing list