Laravel 5.1 on ubuntu 14.04 Session problems

I had the following problem with laravel (5.1) sessions on ubuntu 14.04. For each request, a new session file is created in the repository / structure / sessions. As you might have guessed, the session driver is "file", "lifetime" is 120. This seems to be some kind of permission error. I set the permission of the storage folder to 755 (also 777), but each newly created session file has a resolution of 664 (rwrwrr--). Through google, I found a session problem related to dd (...), but this is not the case here, especially since it works fine in a Windows environment. What I originally wanted to do was use the redirect () -> intended (), which uses the information stored in the session.

Should I run php artisan in a special way?

+5
source share
2 answers

Since I use Vagrant and Homestead, everything is fine. Running PHP built into the web server seems like it is just kludge.

+1
source

Test functionality that provides all permissions for the storage folder

find /path/to/storage/folder -type d -exec chmod 777 {} \; 

If it works, set the permissions for the propeller, which in most cases should be

 find /path/to/storage/folder -type d -exec chmod 775 {} \; 

This way you only change permissions on directories, not files.

If the problem that he recently created installs with a different owner, you can set a resolution for it.

I like when I develop on my local server, I have my user, and the www-data user is the only one for Apache, so if apache creates a new file, the property starts to get confused.

 find /path/to/root/of/project -type d -exec chmod g+s {} \; 
0
source

All Articles