Go Back   The macosxhints Forums > OS X Help Requests > Networking



Reply
 
Thread Tools Rate Thread Display Modes
Old 02-21-2013, 05:01 AM   #1
kiezpro
Prospect
 
Join Date: Apr 2008
Posts: 11
Question File Sharing - Default Group Permissions

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?
kiezpro is offline   Reply With Quote
Old 02-21-2013, 08:47 AM   #2
agentx
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
You might want to add -R (recursive) to command if you have lots of sub folders and files you want to correct.
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.
agentx is offline   Reply With Quote
Old 02-21-2013, 09:07 AM   #3
kiezpro
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!
kiezpro is offline   Reply With Quote
Old 02-21-2013, 09:25 AM   #4
agentx
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.
agentx is offline   Reply With Quote
Old 02-21-2013, 09:29 AM   #5
agentx
Hall of Famer
 
Join Date: Feb 2003
Location: Brighton, UK
Posts: 3,811
BTW ls -lea will show ACLs
agentx is offline   Reply With Quote
Old 02-21-2013, 09:45 AM   #6
agentx
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
agentx is offline   Reply With Quote
Reply

Tags
file sharing, permissions

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT -5. The time now is 10:23 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.