LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 03-13-2011, 05:53 PM   #1
thefoyer13
LQ Newbie
 
Registered: Mar 2011
Posts: 4

Rep: Reputation: 0
Centos LAMP + FTP


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.

Thanks!
 
Old 03-13-2011, 06:09 PM   #2
siranjeevi
Member
 
Registered: May 2010
Location: India
Posts: 79

Rep: Reputation: 7
Hi,

Did you check apache logs.?. If not check the apache server logs while accessing the page, or paste them here. We will help you.
 
Old 03-13-2011, 06:22 PM   #3
thefoyer13
LQ Newbie
 
Registered: Mar 2011
Posts: 4

Original Poster
Rep: Reputation: 0
Hello!

Here is my error log after I restarted apache and refreshed my page:

[Sun Mar 13 17:53:23 2011] [notice] Apache/2.2.3 (CentOS) configured -- resuming normal operations
[Sun Mar 13 17:53:26 2011] [error] [client *ip*] (13)Permission denied: access to / denied
 
Old 03-13-2011, 06:44 PM   #4
thefoyer13
LQ Newbie
 
Registered: Mar 2011
Posts: 4

Original Poster
Rep: Reputation: 0
Ok apparently the cause of this was SELinux, found a solution from overstack.com:

echo 0 > /selinux/enforce

Restarted apache, and all was well.
 
Old 03-13-2011, 06:51 PM   #5
Brocifer
Member
 
Registered: Mar 2011
Posts: 46

Rep: Reputation: 1
Quote:
Originally Posted by thefoyer13 View Post
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.

Cheers
 
Old 03-13-2011, 07:27 PM   #6
thefoyer13
LQ Newbie
 
Registered: Mar 2011
Posts: 4

Original Poster
Rep: Reputation: 0
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to configure network redundancy in LAMP (CentOS)? albie17 Linux - Newbie 2 01-19-2011 05:11 AM
My HOW-TO: LAMP on CentOS from Source (including Movies) utw-mephisto Linux - Newbie 13 04-09-2008 04:49 PM
Remote setup of LAMP server on CentOS 5 satimis Linux - Server 19 02-01-2008 12:42 AM
LXer: CentOS 4.6 Server Setup: LAMP, Email, DNS, FTP, ISPConfig LXer Syndicated Linux News 0 01-10-2008 04:40 PM
LXer: CentOS 5.1 Server Setup: LAMP, Email, DNS, FTP, ISPConfig LXer Syndicated Linux News 0 12-06-2007 04:21 PM


All times are GMT -5. The time now is 04:04 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration