I am running Arch and have just install XAMPP. I have change changed my document root to /srv which is a separate EXT4 partition. I have set the Apache HTTP server to use a group called "http". I have added my user to the http group. I want every file created in the /srv folder to assigned to the HTTP group and for all the files to have group read and execute access.
I have ran the following commands:
sudo chgrp -R http /srv/
sudo chmod -R g+rwxs /srv/
And set the umask at the bottom of my ~/.bashrc to:
umask 002
However I notice 2 things:
- When I extract a zip file that is owned by the http group, the group of the immediate folder that is created by my archive application is owned by http but all the subdirectories and files are still owned by the default "user" group.
- Creating a new file with nano gives me a different permission (-rw-rw----) than creating one with Gedit (-rw-r--r--).
What umask should I be using to force user - all
, group - read/execute
, others - none
?
How do I force all files to be owned by http regardless of what program creates them there?