I have structure like:
/home/reed/, user=reed, group=reed
- apache-conf, user=reed, group=reed
- apache-web, user=reed, group=apache, perm=0770
- www.website.com, user=reed, group=apache, perm=0770
- index.php, user=reed, group=apache, perm=0660
I'm using umask 007
in /etc/profile
so my directories & files are created with these same permissions. & that worked.
I ran chmod g+s /home/reed/apache-web;
and chmod g+s /home/reed/apache-web/www.website.com
so new directories will keep the group=apache
So I mkdir /home/reed/apache-web/test/
, then ls -la ...
& it shows reed
is both the user & the group.
I tried using chmod 4770 /home/reed/apache-web/test/
, but mkdir
still sets both user & group to reed
(or root
if I'm running with sudo)
I tried it in the www.website.com
dir as well with the same results.
I'm on Debian 10 with root access available. I also tried switching to user=apache & group=reed, then using chmod u+s thedir
, but again, mkdir
makes both the user & the group the current shell user. I also tried logging out & logging back in
Asked by Reed
(141 rep)
Aug 25, 2020, 09:03 PM
Last activity: Sep 2, 2024, 02:43 PM
Last activity: Sep 2, 2024, 02:43 PM