If you have a customer that wants to share a folder between 2 separate accounts of theirs, it’s a little tricky to get the permissions just right, but it can be done fairly easily.
Note* This is not something that cPanel supports, and their may be some inherent security risks with this, so do this at your own risk.
For this case, we have the following setup
User 1: bob
User Group: bobgroup
Home dir: /home/bob
Wants to share this folder with jane: /home/bob/public-html/uploadsUser 2: jane
User Group: janegroup
Home dir: /home/jane
The first thing you need to do is add jane to bob’s user group. To do this, run the following command
usermod -aG bobgroup jane
This will make it so that jane will now have the same permissions to anything the bobgroup has permissions to.
Next you need to give permissions to the /home/bob/public_html/uploads folder so that the bobgroup group name has full permissions.
Use the following commands to setup the permissions properly.
umask 002
chmod 771 /home/bob/
chmod 775 /home/bob/public_html/
chmod 775 /home/bob/public_html/uploads/
This makes it so that both users can read, write, and execute files in the uploads folder, while everybody else will have only read and execute.