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.

cpanel session error looking for suggestions

Discussion in 'Security' started by Jayreis, Jan 30, 2013.

  1. Jayreis

    Jayreis Member

    Joined:
    Feb 13, 2002
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    I am not sure if this is the correct category to post this in but am looking for feedback

    I have a website I am taking over maintaining and have moved the site from an older cpanel / php server to my
    newer dedicated server which has cpanel and php5

    Now when I go to the website I get an error saying

    Warning: session_start() [function.session-start]: open(/tmp/sess_f4211b90ee82bfa5ff35de86b824904d, O_RDWR) failed: Permission denied (13) in /home/*****/public_html/subindex.php on line 2

    I have tried to change the permission on the folder to 0777 by going into cpanel file manager then going up one level above public_html and seeing the tmp folder there

    However that did not fix the issue
    So I am looking for suggestions on how to fix this? Edit the servers php.ini file but how and edit it to reflect what?
    I have seen some conflicting forum posts around the internet when I tried googling this issue

    thanks
     
  2. cPanelJared

    cPanelJared Technical Analyst
    Staff Member

    Joined:
    Feb 25, 2010
    Messages:
    1,842
    Likes Received:
    18
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    The problem is that the session files in /tmp are owned by the wrong user. Either the old server used suPHP and the new one uses DSO, or vice versa, but suPHP writes files as the account's user, and DSO writes files as the nobody user. This results in file ownerships that prevent the files from being accessed when the handler changes.

    The message is referring to /tmp, which is the server's /tmp - not the tmp in the account's home directory. The /tmp in question is in the server's root directory, not in the account's home. If you are not the server administrator, you do not have direct access to /tmp, so you might need to ask your host for help.

    While ordinarily I do not advocate mass deletion of files, if you delete the sess_* files in the server's /tmp, not the account's tmp, it may start working without needing to do anything else. The problem as you describe it is that the script is running as one user and cannot open session files written as another user, and simply deleting the session files will allow it to write new ones that it can read.
     
Loading...

Share This Page