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.
The permissions on the files you're creating probably don't have write permission for group. If you set the
fmask
(for files) and thedmask
(for directories) in your/etc/fstab
this should fix the issue.fmask
might be something like113
, for default permissions of664
orrw-rw-r-
dmask
might be something like002
, for default permissions of775
orrwxrwxr-x
.Remember directories need execute permission to access them.
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