This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: umask problem: wrong permissions for new files


On Fri, 20 Apr 2018 12:03:57, Ulli Horlacher wrote:
> cygwin umask does not work as expected:
> 
> /tmp: uname -a; umask; rm -f zz; touch zz; ls -l zz
> Linux diaspora 4.4.0-119-generic #143-Ubuntu SMP Mon Apr 2 16:08:24 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
> 0022
> -rw-r--r-- 1 framstag users 0 Apr 20 12:00 zz
> 
> /tmp: uname -a; umask; rm -f zz; touch zz; ls -l zz
> CYGWIN_NT-6.1 WIN-LS0QDOSDIBL 2.10.0(0.325/5/3) 2018-02-02 15:21 i686 Cygwin
> 0022
> -rw-rw----+ 1 admin None 0 Apr 20 12:00 zz
> 
> Why do not have new files mode -rw-r--r-- on cygwin?

They do.

64-@@ umask
0022
64-@@ ls -l /tmp
total 0
-rw-r--r-- 1 Henri None 0 Apr 20 14:37 junk
64-@@ touch /tmp/junk
64-@@ ls -l /tmp
total 0
-rw-r--r-- 1 Henri None 0 Apr 20 14:39 junk
64-@@ getfacl /tmp
# file: /tmp
# owner: Henri
# group: None
# flags: --t
user::rwx
group::rwx
other:rwx
default:user::rwx
default:group::r-x
default:other:r-x

64-@@ icacls e:/Cygwin64/tmp
e:/Cygwin64/tmp Seven\Henri:(F)
                Seven\None:(RX,W)
                Everyone:(RX,W)
                NULL SID:(RD)
                CREATOR OWNER:(OI)(CI)(IO)(F)
                CREATOR GROUP:(OI)(CI)(IO)(RX)
                Everyone:(OI)(CI)(IO)(RX)

Successfully processed 1 files; Failed processing 0 files

Remember, it is Windows ... So you have to work a little harder :-)

Henri


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]