apache - Symfony 2.8 can't write in /var/lib/php/sessions/ -
good day!
i'm bit confused here in symfony functionality terms. have website wich supossed write sessions in /var/lib/php/sessions/
. i'm confused right there, because in /var/www/html/myproject/ recursively property of www-data:www-data
(yes, i'm using apache). owner of /var/lib/php/sessions/
root
, when apache tries write there, 500 server error regarding writing permissions in directory.
i have divided opinions here. people advice me modify config.yml
manage sessions inside project directory, while other people bad practice. but, how targeting /var/lib/php/sessions/
without file permission error?
here's via apache url:
oops! error occurred server returned "500 internal server error". broken. please let know doing when error occurred. fix possible. sorry inconvenience caused.
here's via php development webserver:
warning: sessionhandler::read(): open(/var/lib/php/sessions/sess_u3eg1842nlpkbm0rvddrq37dc2, o_rdwr) failed: permission denied (13) 500 internal server error - contexterrorexception
i hope can me.
thanks in advance.
warm regards.
in order create file user must have write , execute permission on directory.
mkdir /tmp/foo chmod 300 /tmp/foo touch /tmp/foo/bar test -e /tmp/foo/bar
in case setting 'other' permissions 3 allow www-data write it. chmod o+wx /var/lib/php/sessions/
in order remove file user must have write , execute permission on directory.
in order list file names in directory user must have read permission on directory. note if know filename it's not required have permissions listing directory.
in order list properties of file user must have execute permission on directory.
on computer permission /var/lib/php/sessions
drwx-wx-wt
. t indicates execute & sticky bit. sticky bit directories means owner can delete it.
see unix file , directory permissions , modes wayne pollock more info.
Comments
Post a Comment