2

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.

3 Answers 3

0

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.

6
  • 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
    Commented Mar 20, 2012 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
    Commented Mar 20, 2012 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
    Commented Mar 20, 2012 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
    Commented Mar 20, 2012 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
    Commented Mar 20, 2012 at 12:00
0

sudo vi /etc/launchd-user.conf

insert:

umask 000

save the new file.

reboot

praise the Lord of the Apples...

have a nice nightmare... ;-)

0

you can create a group for the users

and than you set the file permissions to

User rwx  
Group r--  
Other ---

so all users have the full permissions, the groupmembers can read and all other have no rights

http://support.apple.com/kb/HT2963

You must log in to answer this question.

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