Warning: Unknown: open(/var/lib/php/session/ O_RDWR) failed: Permission denied (13)

I was getting the following error on a *fresh* CentOS…

Warning: Unknown: open(/var/lib/php/session/sess_isu2r2bqudeosqvpoo8a67oj02, O_RDWR) failed: Permission denied (13) in Unknown on line 0

Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/var/lib/php/session) in Unknown on line 0

This will do the work…

chown -R nginx:nobody /var/lib/php/session && chmod -R 770 /var/lib/php/session

Leave a Reply

Your email address will not be published. Required fields are marked *

*