The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Permission problem after disabling suphp

Discussion in 'General Discussion' started by nidhal, Nov 16, 2012.

  1. nidhal

    nidhal Member

    Joined:
    Nov 12, 2012
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hello,

    So I had suphp enabled by default in my server but I wanted to rebuild apache and php, once done I had big problem with permissions, my script could not include/open/write any file even when the folder permission is 777.
    So I had to enable suphp again and it worked just fine.
    Is there any way to fix this problem? I did some research and I think this has something to do with file ownership?
     
  2. iakela

    iakela Member

    Joined:
    Oct 18, 2009
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hi,

    Probably there is wrong permission on public_html folder, should be: 755 and user:user. Anyway, you should to check error_log to be sure:
    Code:
    tail -f /usr/local/apache/logs/error_log
     
  3. nidhal

    nidhal Member

    Joined:
    Nov 12, 2012
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    That didn't help, I keep getting
    "failed to open stream: Permission denied"
    I changed the ownership was already user:user
    I found someone who had the same issue, he said he fixed this using the chown command (user:nobody)
    Any idea on how to use this ?
     
  4. Galvin

    Galvin Member

    Joined:
    Aug 27, 2011
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    Hi,

    You need to change the permissions and ownership of the public_html.

    Ownership :- User:Nobody
    Permission :- 750

    Under public_html folder you need to set the permissions like below :

    For Folder :-
    Ownership : user:user
    Permission : 755

    For Files :-
    Ownership : user:user
    Permission : 644

    Once it will done issue will be fixed.
     
Loading...

Share This Page