Question

I'm trying to figure out how to setup two users with full access to the same path eg.:

User: user1 Home: /var/www/user1website.com/public_html/

User: user 2 Home: /var/www/user1website.com/public_html/uploads/files/

I need user1 to be able to access (modify, read, write, exec) all files in /var/www/user1website.com/public_html/*, and user 2 to be able access (modify, read, write, exec) only /var/www/user1website.com/public_html/uploads/files/. E.g. user2 has uploaded and updated a file called 20120513.txt in /var/www/user1website.com/public_html/uploads/files/20120513.txt. Now user1 can access same file /var/www/user1website.com/public_html/uploads/files/20120513.txt with full permissions. Any ideas?

Thanks

Was it helpful?

Solution

You need to add user1 to group that user2 belongs to. Usually group name has the same name as username. You can use it manually by editing /etc/groups file or usermod -G utility.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top