2

I'm new to umask so please correct me if i'm wrong.

We have a mac OS X file server at work with multiple SMB shares. Whenever users create files, they get created as -rw-r--r-- as this is the default umask (022). I want to change it to (002) so created files will have -rw-rw---- as default. This way all users in the same group can access the files.

Apple advises to change umask like this:

sudo launchctl config user umask nnn

After doing sudo launchctl config user umask 002 I got the following message:

Configuration applied. You must reboot for changes to take effect.

I rebooted and got the following:

$ umask
0022

what am I doing wrong, please advise.

I'm running OS X Server 10.10.3 Yosemite with Server.app 4.1

5
  • What do cat /var/db/com.apple.xpc.launchd/config/user.plist and ls ... show?
    – klanomath
    Commented Jan 11, 2017 at 20:18
  • I think this is the holy grail I've been looking for... The first one shows umask = 0. Should I set this to 002?
    – d1che
    Commented Jan 11, 2017 at 20:33
  • I updated the file, rebooted but the command umask still returns 0022. Even if I check the file now it shows <integer>002</integer>.
    – d1che
    Commented Jan 11, 2017 at 20:50
  • That is not the problem. The .plist get's updated but the command umask doesn't return the value. Also, try to do sudo launchctl config user umask 022 you'll see that the value in the plist file changes to 18 so I don't think these are interchangeable. What are your thoughts on this?
    – d1che
    Commented Jan 11, 2017 at 21:37
  • I meant: I ran the command sudo launchctl config user umask 002 in 10.10.5 with no problem (-> umask shows 0002) and the user.plist was updated properly to .... <integer>002</integer>.
    – klanomath
    Commented Jan 11, 2017 at 21:44

1 Answer 1

2

I can only guess but I think it's an error in 10.10.3 which is solved in 10.10.5 (or maybe 10.10.4) because none of my 10.10.5 hosts show your 10.10.3 behavior.

So I recommend to update to 10.10.5/4.1.5.

BTW the integer in /var/db/com.apple.xpc.launchd/config/user.plist is calculated by converting the three binary "triplets" to a decimal number:

002 = 000 000 010 =   2
022 = 000 010 010 =  18
666 = 110 110 110 = 438

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .