Let's assume that I have a webhosting server running on my ubuntu 13.04 system. For each customer I get that wants to host a website on my server I create a user and add it to a group called 'customers'. All of these customers get a private folder in my /home/
folder, in which there is a folder tree that should not be deleted. So let's say that one of my customers' name is bob. He will get /home/bob/
as his private folder, but that folder should also contain a folder tree like this:
/home/bob/
|
|-> /www/
|
|-> /bobsdomain.com/
| |
| |-> /public_html/
| |-> /cgi_bin/
|
|-> /bobsotherdomain.com/
|
|-> /public_html/
|-> /cgi_bin/
Bob should obviously be the owner of /home/bob
because otherwise bob couldn't create or delete files and folders inside his home folder. However, everything between /www/
and /public_html/
or /cgi_bin/
should never be removed. Everything from /public_html/
or /cgi_bin/
and down should be bob's choice wether he wants to delete it or not.
In order to do this, could I just set the folders between /www/
and /public_html/
or /cgi_bin/
as property of root, or would that cause bob being unable to add files to the /public_html/
and /cgi_bin/
folders?
If this is not possible, in what other way should I do this?