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.

Permissions: Wordpress and Cpanel working together?

Discussion in 'Security' started by Chad Dunbar, Oct 14, 2011.

  1. Chad Dunbar

    Chad Dunbar Registered

    Joined:
    Oct 14, 2011
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Petaluma, California, United States
    cPanel Access Level:
    Root Administrator
    So I am having an issue with a wordpress install on my cpanel and curious if I can get some assistance. I have multiple blogs on different users within cpanel. So what I am trying to accomplish is wordpress is able to freely update plugins and manage everything in the back-end without any permissions issues AND at the same time, cpanel able to manage the files in the backend.

    I know this can be done as I was hosted with another company who used cpanel and everything was working in harmony.

    My setup is I am running litespeed as the webserver if that changes anything. What I done so far was played with the chown command to see if it fixes it. Here are my findings:

    (current directories are 0755 and files are 0644.)

    Command was ran in the public_html folder with -R:

    cpuser = cpanel works, wordpress doesn't
    cpuser:nobody = cpanel works wordpress doesn't
    nobody:cpuser = wordpress works, cpanel doesn't
    nobody = wordpress works, cpanel doesn't

    When I say working, wordpress can do its thing (without getting prompt for an FTP server) and cpanel can modity and control the files.

    Is there a way to make both wordpress and cpanel work without making everything 0777?
     
  2. mtindor

    mtindor Well-Known Member

    Joined:
    Sep 14, 2004
    Messages:
    1,279
    Likes Received:
    36
    Trophy Points:
    48
    Location:
    inside a catfish
    cPanel Access Level:
    Root Administrator
    Are you running Litespeed SuEXEC? If so, the site files should be owned by cpuser:cpuser.

    (I'm not a Litespeed admin, know next to nothing about it. However, I know it supports running PHP as the user. And if your Litespeed is configured to do so, you want the files in public_html to be owned by cpuser:cpuser)

    M
     
  3. Chad Dunbar

    Chad Dunbar Registered

    Joined:
    Oct 14, 2011
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Petaluma, California, United States
    cPanel Access Level:
    Root Administrator
    Wow, you are completely right! SuEXEC on the litespeed admin panel was set to off but it was confusing me in the cpanel option, it was "on".

    Here was the option I had to change:

    PHP suEXEC: On

    (in the server > General > Settings)

    Thanks :)
     
    #3 Chad Dunbar, Oct 14, 2011
    Last edited: Oct 14, 2011
  4. mtindor

    mtindor Well-Known Member

    Joined:
    Sep 14, 2004
    Messages:
    1,279
    Likes Received:
    36
    Trophy Points:
    48
    Location:
    inside a catfish
    cPanel Access Level:
    Root Administrator
    You're welcome. Glad I could help. Since you intend on runing suEXEC (a good idea), then make sure you chown the appropriate files in public_html to cpuser:cpuser.

    Also, keep in mind that when cPanel creates account, the public_html folder itself has the following permissions:

    cpuser:nobody drwxr-x--- (chmod'd 750 and chowned cpuser:nobody, but not recursively)

    Then the files and folders inside public_html are all chown'd cpuser:cpuser and have 644 (files) and 755 (folders) permissions.

    M
     
    #4 mtindor, Oct 14, 2011
    Last edited: Oct 14, 2011
  5. Chad Dunbar

    Chad Dunbar Registered

    Joined:
    Oct 14, 2011
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Petaluma, California, United States
    cPanel Access Level:
    Root Administrator
    I went through all of the users I changed to cpuser:nobody because now I got this from litespeed:

    [ERROR] Can not open directory for URI: /!

    after doing cpuser:cpuser.

    Could there be something else wrong?
     
Loading...

Share This Page