Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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.
Good Afternoon, I am attempting to complete the setup of a web server at my home for web development purposes. I am not totally new to Linux but I have little experience.
I wanted to build the server from scratch to learn as much as I could along the way, I installed and configured each part of the LAMP to my liking using various guides and tutorials on the internet.
My issue is regarding adding vsftp to the setup injunction with apache. I successfully setup apache/mysql/php. Then I installed vsftp and configured it.
I setup a new user into my new FTP user group. I set the user home directory to "/var/www/user_name/" (This is my apache virtual server document root) and I was successfully able to connect to the FTP server and transfer/create files. But when I attempted to access via HTTP "www.virtualserver-domain.com" I would receive a 403 forbidden error even though the directory existed along with an index.html file. I am assuming there is a problem with permissions since I made the FTP account the owner of the HTML root directory and chmod 755.
This is where I am stuck, let me know if I left anything out.
Ok apparently the cause of this was SELinux, found a solution from overstack.com:
echo 0 > /selinux/enforce
Restarted apache, and all was well.
Disabling selinux is not really a good solution. What you need to do is enable the associated SEbool value(s) and add an the appropriate SElinux context. If you want to set this up properly, I would suggest:
Code:
man ftpd_selinux
It's really not that bad man, I would highly recommend learning how to do this for any configured service. That said, your solution WILL work, but you give up any benefits derived from SElinux.
Agreed, this was a temporary solution, rebooting the machine would turn selinux back on and I would prefer it be on. I will look into man ftpd_selinux, thanks for the suggestion.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.