I have the following error on my projet and i tried many solutions to fix it but in vain.
Warning: SessionHandler::read(): open(/var/www/html/app/../var/sessions/prod/sess_e7382632eb312b42fc19ef3cae8c079b, O_RDWR) failed: Permission denied (13) in /var/www/html/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/Proxy/SessionHandlerProxy.php on line 61 Warning: SessionHandler::write(): open(/var/www/html/app/../var/sessions/prod/sess_e7382632eb312b42fc19ef3cae8c079b, O_RDWR) failed: Permission denied (13) in /var/www/html/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/Proxy/SessionHandlerProxy.php on line 69
i used those command to init my project:
- $ HTTPDUSER=
ps axo user,comm | grep -E '[a]pache|[h]ttpd|[_]www|[w]ww-data|[n]ginx' | grep -v root | head -1 | cut -d\ -f1
- $ sudo setfacl -R -m u:"$HTTPDUSER":rwX -m
u:
whoami
:rwX var - $ sudo setfacl -dR -m u:"$HTTPDUSER":rwX -m
u:
whoami
:rwX var
this is my config .yml
> session:
> handler_id: session.handler.native_file
> save_path: "%kernel.root_dir%/../var/sessions/%kernel.environment%"
I executed chown -R whoami and chmod -R 777 on var folder wihtout any result. any help please. sorry for the english.