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?
drwxr-sr-tso the chmod didn't work.