Ownership inheritance of parent dir not working, only group 'apache' is applied
Owner should be 'apache' but is 'root'
OS: rocky linux 9, selinux - getenforce : Permissive
umask 002
umask:
-----
0002
-----
sudo mkdir /var/www/html/te && \
chown apache:apache -R /var/www/html/te && \
sudo chmod g+w /var/www/html/te && \
sudo chmod g+s /var/www/html/te && \
touch /var/www/html/te/testfile.txt
parent_directory:
-------------------------
/var/www/html/te ownership- apache:apache / rwxrwsr-x '2775'
-------------------------
ls -al /var/www/html/te:
-------------------------
total 0
drwxrwsr-x. 2 apache apache 26 Jun 3 11:23 .
drwxrwsr-x. 3 apache apache 16 Jun 3 11:23 ..
-rw-rw-r--. 1 root apache 0 Jun 3 11:23 testfile.txt
-------------------------
what could be wrong?
Thank you
chmod u+s
; but even if you did, most likely it wouldn't matter.