'open(/var/lib/php/session/...sesionid, O_RDWR) failed: Permission denied (13)

I am running my website on using ec2 nginx. I have done a update on the instance and now I getting this error when the site loads.

open(/var/lib/php/session/sessionid, O_RDWR) failed: Permission denied (13) in /var/www/html/includes/session.php on line 17

 session_start(): Failed to read session data: files (path: /var/lib/php/session) in /var/www/html/includes/session.php on line 17

I am wondering how to fix this?

Appreciate any help Thanks



Solution 1:[1]

You install PHP from zero in this machine? You already tried to put a complete permission in this folder? Ex: sudo chmod 777 -R /var/lib/php/session

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 espositovitor