Long time, no post! But I figured I’d run this past the gurus here to get some ideas.
We have a Web server running an older version of OpenSUSE 11. I’m upgrading it as we speak. I figured I’d take that opportunity to address some irritating issues with permissions and access.
We have two virtual servers:
www.company.com
, and forums.company.com. They work splendidly. The DocRoot on these are the folders /home/www/public_html and /home/phpbb3/public_html. In the Home directory, we also have user folders, accessed with the usual “/~username” syntax (and of course, once again, their content is in their own “public_html” folder). Everything works fine at present, but I want to tighten up the permissions a bit. Right now, we occasionally have people logging in with WinSCP or some similar program accidentally clobbering a file in a different directory.
(Doesn’t happen often, so I’ve let it slide for now, but like I said, I figured I might as well address that while I’m upgrading the OS. And just for the record, I didn’t originally set up this Web server. I inherited it – and the permission structure that my predecessor had used.)
Let’s say /home has these folders, all of which have a “public_html” with content exposed to the Internet:
/home/www
/home/forums
/home/joe
/home/stephen
/home/tommy
One of the things that my predecessor was doing was creating a user each time we added a folder. For example, if we created unique content for Advertiser1, he’d get a /home/Advertiser1 directory with a “public_html” folder. While I want to keep the current directory structure, the truth is, “Advertiser1” will never, ever log into our Web server. Only admins make changes.
How would you do the groups/ownership to ensure that:
- Only the admin group can access /home/www (or any of the other “special” folders, not listed above).
- Only I can access /home/forums. I’m the admin for our forums.
- The admin group OR the users (joe, stephen and tommy) can access the public_html section of their own home directories.
It’s not really that big of a deal – the enterprise versions usually set up a per-user group, ie., a group that has the same name as the user, and each user’s folder is owned by that group. I can simply make sure that the admins are in that group. But I was curious as to what some of you folks here think, those of you who run Webservers (most of which are considerably larger than mine).
Suggestions? I deeply appreciate it.