Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Nov 2007
    Posts
    1

    Default apache user nobody99

    We have had a problem running a php script that write a csv file. The error is permission denied. I found that in the phpinfo apache is running as the user nobody99(99). I am told that we need to have apache run as the user apache in order to fix this. I have two questions:

    1) Does changing the apache user to a more powerful user weaken security?

    2) How would I go about changing the user using WHM?

    I hope someone could shed some light on this for me.

    Thanks, jeff

  2. #2
    Member Amit Deshmukh's Avatar
    Join Date
    Jul 2007
    Posts
    83

    Cool Apache

    You need check the following file and the permission of apache :-

    # pico /etc/passwd

    Regards,
    Amit

  3. #3
    Member
    Join Date
    Apr 2006
    Location
    INDIA
    Posts
    69

    Default

    1) Quick fix.. you can apache with phpsuExec or mod_suphp which will then run all scripts as user:user

    But you must understand pros/cons of this... before doing it.


    Workaround
    ##########
    2)

    Please change the folder permissions to 777 where the php script write a csv file..


    example.. if the php script writes the csv file to /home/user/public_html/csv/

    change the permissons on folder to 777

    cd /home/user/public_html/

    chmod 777 csv/ -R


    You can do this from your file manager as well.


    all csv file will now be written inside folder /home/user/public_html/csv/

    say file1.csv , file2.csv

  4. #4
    Member
    Join Date
    Nov 2006
    Location
    Oklahoma City, Oklahoma, United States
    Posts
    18

    Default Auto chmod

    How to auto chmod for folder to 755 and file to 644
    I mean recursively.
    I try with chmod -R 755 folder
    then chmod -R 644 *.* but it wont work

  5. #5
    Member darren.nolan's Avatar
    Join Date
    Oct 2007
    Posts
    259

    Default

    Code:
    find -type d -exec chmod 755 {} \; 2>&1
    find -type f -exec chmod 644 {} \; 2>&1
    Make sure you are in the appropriate home folder before commencing. Eg;
    Code:
    cd /home/username
    before you run both those commands.

Similar Threads & Tags
Similar threads

  1. Apache User and cPanel
    By zoros in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 09-24-2007, 05:41 PM
  2. Apache running as apache user and group?
    By bsasninja in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 07-18-2006, 03:34 PM
  3. Changing Apache user
    By Nightweaver in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 10-26-2005, 11:31 AM
  4. apache user on cpanel
    By tundra96 in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 11-22-2004, 08:49 AM
  5. How to run apache as user 'apache' not 'nobody'
    By jnetsurfer in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 02-27-2004, 04:39 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube