2

I want to have a shared folder on my system that will be used by all users as a place to put files and executibles.

I have created a folder and given it rwx to everyone - but whenever a new user adds something the new item has restrictive permissions

$ sudo mkdir /dmz
$ sudo chmod -R 777 /dmz
$ touch /dmz/foo
$ ls -l /dmz
-rw-r--r--. 1 alshdavid alshdavid 0 Jun  3 10:07 foo

I am using Fedora (I am not sure if distros make a difference with this). Is there a way to have this folder grant permissive rules for all users?

Alternatively, I'm still pretty new the the idea of groups, if I made a dmz group and manually added my users to that group, could new files in that folder be given rwx for members of the group?

1 Answers1

0

So what I did was set a umask using these instructions: How to set umask for a folder and it's subfolder?

sudo groupadd dmz
sudo mkdir /dmz
sudo chmod -R 1775 /dmz
sudo chown root:dmz /dmz
sudo setfacl -d -m group:dmz:rwx /dmz

sudo usermod -a -G dmz user1 sudo usermod -a -G dmz user2