This is a simple question, I'm sure, but I can't seem to find any reason why I can't get this to work.
I'm trying to set up group folders within the web root for a PHP server. Each department should have a group like this:
All users in group dept1 should have read/write access to the dept1 folder, all users in dept2 should have read/write access to the dept2 folder, etc. In trying to implement this, I created a group like so:
sudo groupadd dept1 sudo useradd -G dept1 -m user1 cd /srv/www/htdocs/dev mkdir dept1 sudo chown -R wwwrun:dept1 dept1 sudo chmod -R g+rwxs dept1
wwwrun is the user that Apache is running as. The idea is for users to be able to create/read/update/delete whatever they want within their department folder. However, upon trying it out, the user account can view the contents of the folder and read files, but not create or write files.
What am I doing wrong?