0

Writing to /home/vishu/ .config/psysh is not allowed

Laravel Project Permissions

Exception: Writing to /home/vishu/.config/psysh is not allowed.

at /usr/share/nginx/html/example/vendor/psy/psysh/src/ConfigPaths.php:228

 @\mkdir($dir, 0700, true);
         }

         if (!\is_dir($dir) || !\is_writable($dir)) {
           \trigger_error(\sprintf('Writing to %s is not allowed.', $dir), E_USER_NOTICE);

             return false;
         }
ViShU
  • 49
  • 8
  • 1
    Did you check file permission? And you should try to give more detail info about question, not just paste code/log/images, see [Help Center > Asking](https://stackoverflow.com/help/how-to-ask). – Calos Jan 07 '20 at 10:54
  • sudo chmod -R 777 storage – Kamlesh Paul Jan 07 '20 at 10:59
  • Solution suggested by bernhardh on github is modification of the location by setting the following to .env XDG_CONFIG_HOME=/path/to/new/location but I am not getting setting of the path thing in Vendor/../Xdg.php – ViShU Jan 07 '20 at 12:03
  • You're only checking if dir is writable and if it's a dir but not if you have permissions to modify it. – Zydnar Jan 07 '20 at 12:53
  • I have permission to write it. -rw-rw-r-- 1 vishu www-data /usr/share/nginx/html/example/vendor/psy/psysh/src/ConfigPaths.php – ViShU Jan 07 '20 at 13:25

1 Answers1

0

If the project is in development state, you can change the whole storage directory permission to 777:

sudo chmod -R 777 storage/
Rouhollah Mazarei
  • 3,969
  • 1
  • 14
  • 20
  • Giving permission 777 is a bad idea even though it is in development stage. – ViShU Jan 07 '20 at 11:01
  • I have changed permissions for Log to 775.Now Error is Writing to /home/vishu/.config/psysh is not allowed. at /usr/share/nginx/html/example/vendor/psy/psysh/src/ConfigPaths.php:228 – ViShU Jan 07 '20 at 11:15
  • this did not work for me. – francisco May 25 '23 at 13:42