2

We moved a Laravel 5.6 Installation from a Windows to a UNIX Webserver. I manage my laravel over the CLI via Putty and develope from my Windows Machine using a Network Path.

I have a strange Problem and just cant find any solution for this, since im also new to Unix/Linux.

When i run a php artisan create command, it works all just fine. Laravel creates the Migration. But i cant edit the Files on my Windows Machine since i got no Permission.

On older Files that was previously generated on my Windows machine, the Right Window on Windows looks like this:

Anyone                               Read
www-data (Unix User\www-data)        Read/Write
www-data (Unix Group\www-data)       Read/Write

The rights on the freshly generated Artisan File looks like these. I already added my Unix User to the www-data group.

Anyone                               read
pm (Unix User\pm)                    read/write
www-data (Unix Group\www-data)       read

I dont know, why the www-data Group dont have read/write Permissions on freshly generated Artisan Files.

1 Answer 1

1

I guess you need to change the umask of the user under which artisan is run.

So, go to the root home directory of that user (I guess /home/pm) edit the file ".bashrc" (or create it doesn't exist) and add this line:

umask 2

which is like "when this user create a new file or directory, make it readable and writable for him or users in his group, but only readable for other users"

More info about umask here: https://www.cyberciti.biz/tips/understanding-linux-unix-umask-value-usage.html

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.