<p>Easy fix. Removed all session data which had www-data:www-data ownership.</p>

CC BY-SA 4.0
2024-02-23T14:27:22.290Z
Could you be a bit more specific about how you solved this? I'm now encountering it on a local DDEV site.
Sandwich
CC BY-SA 4.0
2020-08-24T18:37:56.227Z
2020-08-24T18:37:56.227Z
Jim
<p>On my dev box, I have php/nginx running as 'jim'. I've followed the suggestions on permissions in the install docs. (744 since php is running as 'jim')</p>
<p>I'm getting this error...</p>
<pre><code>PHP Warning – yii\base\ErrorException

session_start(): open(/var/lib/php/sessions/sess_a693hln410j5992m23otjnc7nf, O_RDWR) failed: Permission denied (13)
</code></pre>
<p>and my folder perms look like this...</p>
<pre><code>-rwxrw-r--   1 jim jim    618 Aug 10 14:21 composer.json
-rwxrw-r--   1 jim jim 216281 Aug 24 11:29 composer.lock
drwxrwxr-x   4 jim jim   4096 Aug 18 11:55 config
-rwxrwxr-x   1 jim jim    655 Jun 23 17:36 craft
-rw-rw-r--   1 jim jim    330 Jun 23 17:36 craft.bat
-rw-rw-r--   1 jim jim   1813 Jul 24 15:54 gruntfile.js
-rw-rw-r--   1 jim jim   1037 Jul  7 18:33 gulpfile.js
-rw-rw-r--   1 jim jim    982 Jul  2 17:19 layout.html
drwxrwxr-x   2 jim jim   4096 Aug 17 15:14 logs
drwxrwxr-x   2 jim jim   4096 Jun 23 17:36 modules
drwxrwxr-x 683 jim jim  24576 Jul 11 15:28 node_modules
-rw-rw-r--   1 jim jim    420 Jul 11 15:28 package.json
-rw-rw-r--   1 jim jim 356363 Jul 11 15:28 package-lock.json
drwxrwxr--   7 jim jim   4096 Jul 16 08:38 storage
drwxrwxr-x  12 jim jim   4096 Aug  6 10:07 templates
drwxrwxr--  56 jim jim   4096 Aug 24 11:29 vendor
drwxrwxr-x   5 jim jim   4096 Jul 20 23:36 web
</code></pre>
<p>I've also tried opening up the following files/directories with 777, but still get the error:
.env
composer.json
composer.lock
config/license.key
config/project/*
storage/*
vendor/*
web/cpresources/*</p>

CC BY-SA 4.0
2020-08-24T17:42:35.697Z
I guess the real question is what perms/ownership should be applied to /var/lib/php/sessions/
Jim
<installation><permissions><upgrades>
Permission error on session_start() after 3.5 upgrade
# Permission error on session_start() after 3.5 upgrade

(Asked by: username_0 on 2020-08-24)

On my dev box, I have php/nginx running as 'jim'. I've followed the suggestions on permissions in the install docs. (744 since php is running as 'jim')
I'm getting this error...
PHP Warning – yii\base\ErrorException

session_start(): open(/var/lib/php/sessions/sess_a693hln410j5992m23otjnc7nf, O_RDWR) failed: Permission denied (13)

and my folder perms look like this...
-rwxrw-r--   1 jim jim    618 Aug 10 14:21 composer.json
-rwxrw-r--   1 jim jim 216281 Aug 24 11:29 composer.lock
drwxrwxr-x   4 jim jim   4096 Aug 18 11:55 config
-rwxrwxr-x   1 jim jim    655 Jun 23 17:36 craft
-rw-rw-r--   1 jim jim    330 Jun 23 17:36 craft.bat
-rw-rw-r--   1 jim jim   1813 Jul 24 15:54 gruntfile.js
-rw-rw-r--   1 jim jim   1037 Jul  7 18:33 gulpfile.js
-rw-rw-r--   1 jim jim    982 Jul  2 17:19 layout.html
drwxrwxr-x   2 jim jim   4096 Aug 17 15:14 logs
drwxrwxr-x   2 jim jim   4096 Jun 23 17:36 modules
drwxrwxr-x 683 jim jim  24576 Jul 11 15:28 node_modules
-rw-rw-r--   1 jim jim    420 Jul 11 15:28 package.json
-rw-rw-r--   1 jim jim 356363 Jul 11 15:28 package-lock.json
drwxrwxr--   7 jim jim   4096 Jul 16 08:38 storage
drwxrwxr-x  12 jim jim   4096 Aug  6 10:07 templates
drwxrwxr--  56 jim jim   4096 Aug 24 11:29 vendor
drwxrwxr-x   5 jim jim   4096 Jul 20 23:36 web

I've also tried opening up the following files/directories with 777, but still get the error:
.env
composer.json
composer.lock
config/license.key
config/project/*
storage/*
vendor/*
web/cpresources/*

**Tags:** installation, permissions, upgrades
> **Comments:**
> **username_0**: I guess the real question is what perms/ownership should be applied to /var/lib/php/sessions/  

---

## 1 answers

### Answer by username_0 on 2020-08-24. Score: 1

Easy fix. Removed all session data which had www-data:www-data ownership.

> **Comments:**
> **username_1**: Could you be a bit more specific about how you solved this? I'm now encountering it on a local DDEV site.  

---

