This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Laravel 5 Permissions
#1
Laravel 5 Permissions
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
Reply
Thanks given by:
#2
RE: Laravel 5 Permissions
5050 or motters may be able to help. They have been notified of this post and will answer when they get a chance Wink
-TGates - Project Council

SEARCH the Forums or read the DOCUMENTATION before posting!
Support Sentora and Donate: HERE

Find my support or modules useful? Donate to TGates HERE
Developers and code testers needed!
Contact TGates for more information
Reply
Thanks given by:
#3
RE: Laravel 5 Permissions
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.)
Reply
Thanks given by: TGates
#4
RE: Laravel 5 Permissions
[Moved to proper forum section]
-TGates - Project Council

SEARCH the Forums or read the DOCUMENTATION before posting!
Support Sentora and Donate: HERE

Find my support or modules useful? Donate to TGates HERE
Developers and code testers needed!
Contact TGates for more information
Reply
Thanks given by:
#5
RE: Laravel 5 Permissions
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
No support using PM (Auto adding to IGNORE list!), use the forum. 
How to ask

200$ free to start your VPS 60 days credit
Reply
Thanks given by:


Forum Jump:


Users browsing this thread: 3 Guest(s)