I need to share a directory to a group and that every user can modify files created by a different owner. For example a document file that needs to be constantly updated by different users.

I already created folder, allowed group to read and write that folder, but if user a creates a file it cannot be modified by user b, although it has read permissions. Users: a, b Group: editorial Directory: editorial

If I type ls -la editorial, output is:

drwxrwxrwx 2 a editorial 4096 apr 3 11:42 editorial

note: last "editorial" word in output is highlighted.

Can someone please help me to make files writable by any user since the moment they are created?

Thanks in advance, cheers.

PS: I'm on Ubuntu in case it's useful.

  • what does your smb.conf file say for the editorial directory? you probably need a writeable = yes for that mount point. – fcbsd Apr 3 '18 at 21:51
  • settings are: [editorial] path = /dir/editorial browsable = yes writable = yes guest ok = yes read only = no valid users = @editorial – InF3rN0 Apr 3 '18 at 22:05

The group of the directory is already editorial so you can use setgid so that any files and directories created inside of that directory have the group as editorial which allows anyone in that group to modify files and directories created by anyone else.

From the directory right above:

chmod g+s editorial

In all cases, I strongly advise against setting permissions as 777.

  • This was essential to solve my problem, thanks. I also added: "write list = @group" to smb.conf for editorial directory and kept directory permissions as 770. Thank you and @fcbsd. – InF3rN0 Apr 7 '18 at 18:11
  • You are welcome. Glad to help. – Nasir Riley Apr 7 '18 at 19:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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