Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

How do I change the default file permissions for files created on a Mac server? In case it's relevant, this is a Mac Mini running Mac OS 10.6.7. It's currently used mainly as a file server, and there are several users who need to share files. These files need to be writable by all, rather than the default which is writable only by the owner.

I've been trying to do something with umask and a startup script, but I'm not sure there's a startup script that will apply to connections via Finder. I also need this to apply to files created on a client (also Macs) and copied onto the server.

share|improve this question

2 Answers 2

Apple suggests creating the file /etc/launchd-user.conf (for Server 10.5.3+) - see related Apple support article. And add there the umask ... command.

share|improve this answer
    
I did try that, and it didn't seem to have any effect. Do you know if that filename is literally launchd-user.conf or should it be named after the user - e.g. launchd-brian.conf? Also, do you know if any services need to be restarted once that file is created, or is it just a matter of disconnecting/reconnecting to the server via Finder on the client? –  Bobby Jack Mar 20 '12 at 11:09
    
IMHO it is literally launchd-user.conf and I did try it with my MBP (10.7.3) and it seemed to need a reboot. Or maybe a restart of the launchd daemon. –  boretom Mar 20 '12 at 11:26
1  
Restarting launchd isn't a good idea of course. What you can do and will have an effect for all newly started apps is sudo launchctl umask nnn from a terminal. Where nnn is your umask. If you omit the nnn you'll get the current value of umask –  boretom Mar 20 '12 at 11:37
    
Nearly there. Now, creating a new file in a new shell on the server uses the umask set via your method. But saving a file remotely, from a client, doesn't. Even after reconnecting to the server via Finder. Is there a file-sharing service on the server that I need to restart? –  Bobby Jack Mar 20 '12 at 11:43
    
If you share the files using AFP, you could end all the AFP process and restart it. All the users are disconnected if you do that! First sudo killall AppleFileServer and then `sudo AppleFileServer. –  boretom Mar 20 '12 at 12:00

sudo vi /etc/launchd-user.conf

insert:

umask 000

save the new file.

reboot

praise the Lord of the Apples...

have a nice nightmare... ;-)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.