Jump to content


No write access to PHP session directory

  • Please log in to reply
2 replies to this topic

#1 capoker



  • Members
  • 5 posts

Posted 23 March 2020 - 05:22 PM



My Symfony app is raising an exception about access right to PHP session directory : 

SessionHandler::gc(): ps_files_cleanup_dir: opendir(/var/cpanel/php/sessions/ea-php73) failed: Permission denied (13)


It seems that I can solve by granting write access rights to this directory, but I can't see it in cPanel.

Alternatively, I could change the session directory in php.ini (to /tmp ?), but I don't have access to php.ini either.


Any clue ?

#2 capoker



  • Members
  • 5 posts

Posted 23 March 2020 - 05:47 PM

Ok, solved it by adding "gc_probability: null" in framework.yaml

#3 wolstech


    Rank X Member

  • Root Admin
  • 11,887 posts
  • Gender:Male
  • Location:Pennsylvania

Posted 23 March 2020 - 06:34 PM

I see you've fixed it, but the issue is that the session directory is used by everybody, so you don't have full rights to it. We don't allow custom PHP.ini settings either for security reasons. Your software was designed with the assumption that you have the entire server to yourself.


For those who run into similar errors in the future, the fix is to configure your software to not attempt to clean these folders up.

Please do not PM me for support. Posting on our forums lets all of us learn.
Do you play Minecraft? | Server Monitors | And the Dumbass of the Decade award goes to...

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users