Thursday, 23 November 2017

ubuntu - Creating a samba share where everyone has write access


I have an Ubuntu server in my house running samba. I'm trying to set up a samba share where everyone has read and write access.


I have all the users in a 'sambashare' unix group and want to offer the directory /data/shared to all members of the 'sambashare' group for read and write access.


Ideally if a user creates a file in there using samba it should have the permissions 0644 and be owned by username:sambashare


I can't work out what to put in the smb.conf file to make this work, or what unix permissions to give the /data/shared folder.



Answer



In smb.conf, in the shared directory section, place:


create mask = 0644
directory mask = 2777

Initially, use g+s permission on all directories and chown them for the sambashare group. The s bit will keep the group of the files created the same as the directory group (and 2777 will take care of the s bit on the new directories).


No comments:

Post a Comment

Where does Skype save my contact's avatars in Linux?

I'm using Skype on Linux. Where can I find images cached by skype of my contact's avatars? Answer I wanted to get those Skype avat...