Permission configuration for a Centos-based web server
Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
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.
Permission configuration for a Centos-based web server
I am running an apache server and I can't seem to figure out how best to set up permissions for my web files. Basically I would like to have my dropbox client sync my entire web directory, also I would like postfix to be able to have emails delivered as files to a folder inside my web directory so that I can access them through PHP. Security is not a top priority at the moment compared to easy of access.
This is how things are set up right now (please don't laugh at me for how messy it is):
~/Dropbox/ is my dropbox main folder
~/Dropbox/www contains all my web files
/var/www/html symbolic link -> ~/Dropbox/www
/var/www/html is my document root for apache
~/Dropbox/www/email/new symbolic link -> /home/user/Mailbox/new
/home/user/Mailbox/new is my catchall mailbox for postfix
My problem right now is that I can't seem to set up permissions so that all the different elements have access to the files. I can't seem to grant access to everything even after I chmod everything as 777. Please help with permissions and also if you have a suggestion for a better organization. Thank you!
Undo the link to Dropbox. You can use rsync under cron or something like that to publish the files into Dropbox if you decide you still want to mirror them there. But keep the local files as the original. As for those you want to put on the web, consider these:
Another issue is that the dropbox directory will have SELinux permissions that will prevent apache accessing them. That should be addressed aswell as I believe there was a boolean that preventsapache using home directories. That would have to be changed as well. So the selinux boolean and the actual file context aretwo immediate issues I see.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.