S
S
Sergey Burduzha2017-09-09 10:52:42
ubuntu
Sergey Burduzha, 2017-09-09 10:52:42

What group and rights should be on the /var/lib/php/session folder?

I start the session session_start()
and I get this error

Warning: session_start(): open(/var/lib/php/sessions/sess_8evj8v24fo5trepoa9d436av74, O_RDWR) failed: Permission denied (13) in /var/www/test.site/public_html/test.php on line 7

The /var/lib/php/sessions folder has permissions set to drwxr-xr-x 2 serii www-data 4096 Sep 9 10:32 sessions/
Probably the wrong group, but what permissions should be set on the sessions folder?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir Mukovoz, 2017-09-09
@serii81

Such that the php user has the right to write there.
If you have one php user, then it should belong to him, if there are several, then adjust the rights with group policies.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question