Linux - SecurityThis forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am hosting several websites, mainly for friends, and friends of friends, etc. Each user has a login, so they can access their website files. I am having difficulties figuring out the best strategy for setting ownerships.
Lets say that Apache runs as the apache user. Is it best to set everything to owner:group apache:apache? I do this because its possible I have multiple users that want access to the same website. I add the users to the apache group, and make sure the files/folders are rwx for group.
I also create a mount point in their home directories to the website root so they can access the website structure without really leaving their chroot environment.
You probably want to setup your apache to use suexec. This way, each virtual host will run as a particular user. So you setup a vhost for your user John Smith and put in the suexec directive telling that vhost to run as john:john.
This works out nicely for users who need to FTP to the server and upload their files. They will be logging into the server as "john" so the files that get stored are set with "john" as the owner.
All the files can be set with chmod 700 because only the owner needs access to their own stuff. No need to fool with group permissions.
Under this setup, it doesn't matter what user/group apache runs as. It can be nobody:nobody or apache:apache. Doesn't matter... the user/group is defined in the vhost directive.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.