I have a website which is owned by user apache and group apache and I want to allow another user to be able to work within a folder on the website - I need them to be able to edit and create new files within that folder.
I added a user and assigned them a password and then changed their home directory to the folder I want to give them access to.
Then I added them to the apache group:
[root@app01 documents]# groups peter peter : peter apache
And then ensured that the folder in which I want them to work is (a) owned by apache and (b) allows the group to read and write. (I also tried 777 as a test but still didn't work)
drwxrwxr-x+ 6 apache apache 4096 Nov 16 09:03 documents
Then I log in as the user and try to create a file within the folder but I get the below:
-bash-4.2$ touch 123.txt touch: cannot touch ‘123.txt’: Permission denied [root@app01]# getfacl documents # file: documents # owner: apache # group: apache user::rwx group::r-x group:apache:rw- mask::rwx other::rwx default:user::rwx default:group::r-x default:group:apache:rw- default:mask::rwx default:other::r-x
I can edit files in the directory and save them with no issues but not create new files or folders - what else do I need to do to allow this to work?