I'm have a web server running CentOS Linux 7.2.1511. I do most of the mundane management tasks through Plesk 12.5.30 Update #29 but I also SSH in and get dirty with the command line when I need to. This server is running several websites. I have several different contractors, each that are working on their own set of websites. E.g.
- ContractorA works on WebSite1, WebSite2 and Website3.
- ContractorB works on Website1 and Website4.
All websites are exist in their own directories under /var/www/vhosts
. E.g.
/var/www/vhosts/website1.com
/var/www/vhosts/website2.com
How do I grant each contractor access to their respective sites without granting them access to all websites? I dont want to share credentials between users (i.e. create one FTP account per website and pass those out). I also need this to be scalable. I will be adding more contractors and more websites and I will need to be able to grant any contractor access to any website.
As far as I am aware I can only set one home directory per user. I tried creating symbolic links in home directories but the FTP clients weren't showing or following the symbolic links. Because the scalability issue, I dont think I can solve this simply with file permissions (but maybe I am wrong). I saw some suggestions to mount each folder in the users home directory but that is getting a little beyond my capabilities to comfortably perform and I dont want to screw up my HDD.
Answer
How about "bind mount" ?
# mount -o bind /var/www/vhosts/website1.com/ /home/ContractorA/website1.com/
# mount -o bind /var/www/vhosts/website2.com/ /home/ContractorA/website2.com/
# mount -o bind /var/www/vhosts/website3.com/ /home/ContractorA/website3.com/
# mount -o bind /var/www/vhosts/website1.com/ /home/ContractorB/website1.com/
# mount -o bind /var/www/vhosts/website4.com/ /home/ContractorB/website4.com/
Unmount is the same as usual.
# umount /home/ContractorA/website1.com/
:
Comments
Post a Comment