Ubuntu - chmod g+s does not make new files inherit group
-2
votes
1
answer
1834
views
I installed a fresh ubuntu with apache2.
I created a new folder "/var/www/foobar" with the following user:group ->
black www-data
.
I need new files created inside this folder to inherit the user and group of that folder.
So I executed chmod g+s /var/www/foobar
drwxr-xr-t 2 black www-data 4,0K Okt 9 10:12 foobar
----------
But if I create a new file inside this folder, then the user and group is set to black black
instead of black www-data
.
I also tried to add the user to the group www-data
with sudo usermod -a -G www-data black
but it made no difference.
What am I missing?
Asked by Black
(2138 rep)
Oct 9, 2021, 08:23 AM
Last activity: Oct 9, 2021, 08:41 AM
Last activity: Oct 9, 2021, 08:41 AM