1

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/*

1
  • I guess the real question is what perms/ownership should be applied to /var/lib/php/sessions/ – Jim Aug 24 '20 at 17:42
1

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.