Find the answer to your Linux question:
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 ...
  1. #1
    Just 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

  2. #2
    Linux Guru coopstah13's Avatar
    Join Date
    Nov 2007
    Location
    NH, USA
    Posts
    3,149
    open terminal and run chmod 755 /path/to/folder

  3. #3
    Just 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?

  4. #4
    Linux Guru coopstah13's Avatar
    Join Date
    Nov 2007
    Location
    NH, USA
    Posts
    3,149
    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.

  5. #5
    Just 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 under
    Code:
    grep User httpd.conf
    or
    Code:
    ps aux |grep httpd
    if memory serves Fedora defaults to user and group "www"
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...