문제

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

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top