Results 1 to 5 of 5
Hi all,
I am a total n00b when it comes to Linux and Apache. I have no idea what I am doing but now I have to fix something.
The ...
- 07-16-2009 #1Just Joined!
- Join Date
- Jul 2009
- Posts
- 2
Urgent Help Needed: Linux Permissions and Apache
Hi all,
I am a total n00b when it comes to Linux and Apache. I have no idea what I am doing but now I have to fix something.
The company I work for has a Fedora system with Apache 2.2.6 running. It was running the company database, which they need for day to day running of the website.
I was trying to find some files on the server and I was interested in how the permissions were set up. I right clicked on the server's folder, chose properties then permissions and changed one of the settings. Don't ask, it was a horrible mistake.
The practical upshot of this is that I am getting a 403 error whenever I try to access the database. I REALLY need help in sorting it out. Please, can anybody help me.
Steve
- 07-16-2009 #2
open terminal and run chmod 755 /path/to/folder
- 07-16-2009 #3Just Joined!
- Join Date
- Jul 2009
- Posts
- 2
I ran
chmod 755 /home/website
but there is still a problem. Was that the right thing to do or have I missed something?
- 07-16-2009 #4
you need to do it to the directory you changed the permissions on, i guess you could do it through the GUI, basically you need to make sure the owner has read/write/execute, group has read/execute, and guest has read/execute.
- 07-16-2009 #5Just Joined!
- Join Date
- Mar 2008
- Posts
- 5
you can also add the -R switch to chmod, so that it recursivly changes every file and directory it finds under /home/website - but that may compound your problem.
if the owner and/or group of the files is not the same as the owner/group that apache is running under then read permission on files and execute permission on directories will be the minimum requirement for apache to be able to serve pages.
To find out what user/group apache is running underorCode:grep User httpd.conf
if memory serves Fedora defaults to user and group "www"Code:ps aux |grep httpd
BTW go down to your storeroom and grab an old PC and set it up as a 'playground' running Fedora. Then use that to try things out with. The best way to learn is to break things and then try fixing them, and it is always easier if the machine you are breaking doesn't matter.


Reply With Quote