Sentora Support Forums

Full Version: Laravel 5 Permissions
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hey Guys,
I am using Centos 7 on AWS on an EC2 to work on development for laravel 5. I managed to get composer installed and working and laravel working.

Everything works fine, however any time I run a composer update or any type of command from terminal the files then become owned by root instead instead of apache and my FTP access will then refuse to update files as it no longer has permisson.

In order to make the files writable again through FTP I need to use the following command:

chown -R apache:apache directoryofinstallation

Whilst this is not a major drama it just gets tedius! Is there anyway I can resolve this? Either by running the terminal commands as apache or by allowing apache to edit files created by root.

Any advice would be great.

Mark
@[5050] or @[motters] may be able to help. They have been notified of this post and will answer when they get a chance Wink
Hi,

You did not write it, but I think you run the updater from console with user root, because the file are then owned by it.
If I'm wrong, please explain more !

I would do this :
- chown apache the script you run to do the update
- chmod +s  it so it will be always executed by user apache rather than by real user who run it
Files it create will be now owned by user apache.

Hope it have sense...

(Note : this have nothing related to Sentora.)
[Moved to proper forum section]
You can't run process using apache user..... You can instead build a bash script that will run composer updater and then after that reset back owner to apache ;-). Easy to do and will automate the whole task.

M B