1

I am running Ubuntu 14.04 LTS. I've got a mount point called /files that is owned by root, the group is plugdev and I've given the group write permission. I used some of the information in https://help.ubuntu.com/community/InstallingANewHardDrive to set this up. Specifically the following commands:

sudo chgrp plugdev /files
sudo chmod g+w /files

All the users on the machine are also part of plugdev.

I've mounted a drive that has 1 ext4 partition to it.

At this point both user1 and user2 can create files/folders in /files. But, if user1 creates a file or folder in /files then user2 cannot modify it or create files in it.

I am wondering, how can I make it so all users can read/write (and, where applicable, execute) any/all files/folders created in /files regardless of who created it.

If it matters, /files is also a Samba share that is mounted on a Windows 7 machine.

IMTheNachoMan
  • 255
  • 4
  • 16

2 Answers2

0

The permissions on the files you're creating probably don't have write permission for group. If you set the fmask (for files) and the dmask (for directories) in your /etc/fstab this should fix the issue.

fmask might be something like 113, for default permissions of 664 or rw-rw-r-

dmask might be something like 002, for default permissions of 775 or rwxrwxr-x.

Remember directories need execute permission to access them.

seumasmac
  • 332
  • 2
  • 7
0

I think this is just what you need. This question was answered already over there.

You need setfacl + chmod

https://unix.stackexchange.com/questions/1314/how-to-set-default-file-permissions-for-all-folders-files-in-a-directory

Ryan Babchishin
  • 6,260
  • 2
  • 17
  • 37