|
|
#1 |
|
Prospect
Join Date: Apr 2008
Posts: 11
|
I want to use an old Mac Mini with a regular Lion install as a small file server, using the built-in File Sharing. All my users are in the group "Staff". I'm sharing a single folder, /Users/Shared for them all. Unfortunately, when a user creates a file or folder on the server, the permissions are rw-r--r-- or rwxr-xr-x, respectively. Thus, the other users don't have write access to files or folders one user creates. Of course, I'd rather have new files and folders group writable by default.
I've searched the Web a lot, but I couldn't find a working solution for this problem. What can I do to have new files and folders group writable by default? |
|
|
|
|
|
#2 |
|
Hall of Famer
Join Date: Feb 2003
Location: Brighton, UK
Posts: 3,811
|
You need to add an ACL (access control list) for R/W for group staff to folder or change umask for systems.
Paste this into Terminal Code:
sudo chmod +a "group:staff allow list,add_file,search,delete,add_subdirectory,delete_child,readattr,writeattr,readextattr,writeextattr,readsecurity,writesecurity,chown,file_inherit,directory_inherit" /Users/Shared Code:
sudo chmod -R +a "group:staff allow list,add_file,search,delete,add_subdirectory,delete_child,readattr,writeattr,readextattr,writeextattr,readsecurity,writesecurity,chown,file_inherit,directory_inherit" /Users/Shared Last edited by agentx; 02-21-2013 at 08:54 AM. |
|
|
|
|
|
#3 |
|
Prospect
Join Date: Apr 2008
Posts: 11
|
Weirdly enough, this doesn't set the proper Unix permissions (newly created files/folders still aren't group writable according to ls -al), but nonetheless it works. Thanks!
|
|
|
|
|
|
#4 |
|
Hall of Famer
Join Date: Feb 2003
Location: Brighton, UK
Posts: 3,811
|
POSIX on OS X is crap you have to adjust umask settings on Server/Client side to get POSIX to work how you want.
ACL just works ;-) POSIX and ACL are complementary but ACL trumps POSIX. Last edited by agentx; 02-21-2013 at 09:28 AM. |
|
|
|
|
|
#5 |
|
Hall of Famer
Join Date: Feb 2003
Location: Brighton, UK
Posts: 3,811
|
BTW ls -lea will show ACLs
|
|
|
|
|
|
#6 |
|
Hall of Famer
Join Date: Feb 2003
Location: Brighton, UK
Posts: 3,811
|
you can also set POSIX permissions on /Users/Shared if you want.
Code:
sudo chown root:staff /Users/Shared ; chmod 775 /Users/Shared |
|
|
|
![]() |
| Tags |
| file sharing, permissions |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|