ExpressionEngine / ExpressionEngine-User-Guide

The source for the HTML ExpressionEngine user guides found at https://docs.expressionengine.com
Apache License 2.0
20 stars 78 forks source link

Upgrading via the command line #35

Closed jcopehub closed 5 years ago

jcopehub commented 5 years ago

Upgrading from the command line where the webroot is not owned by the webserver user

While the expression engine can be installed with an owner other then www-data, the system/user directory tree should be owned by www-data in order for the templates to synchronize correctly. That means running eecms upgrade as the non-www-data user fails because that user cannot write to the system/users/cache directory.

I wrote a script something like: chown -R myadmin:myadmin /var/EEBLAHBLAH/system/user || exit ./eecms upgrade -v chown -R www-data:www-data /var/EEBLAHBLAH/system/user

Error Messages

Does not apply


Additional context

kevincupp commented 5 years ago

Yes, permissions vary across server environments and need to be taken into consideration when you upgrade via command line. But, what is the purpose of this issue? Are you suggesting something needs to change in the application? If so, what, exactly?

jcopehub commented 5 years ago

No change to the application. Perhaps the documentation. Per the first line: "This allows you to keep your installation’s files only writable by your user and not also by your web service."--Which is exactly what I want. I always try to keep the web-server area read-only, generally by making the files owned by another user. So the documentation seems to address my favored technique, but does not mention the fact that the /user directory must be owned by the webserver. I'm fine with writing my own shell script to deal with it, but I thought documentation could be a bit more explicit. I'm am not complaining about anything operating wrongly. In fact, I was amused when the shell script I had written for the update was deleted in the course of the update. Well done. The Expression Engine knows what doesn't belong. If you don't think the documentation could be updated, fine. I will agree it is helpful enough.

kevincupp commented 5 years ago

Ah ok thanks for the clarification. Yes it's a little tricky since EE still needs permission to write to certain things. Are you unable or unwilling to put myadmin and www-data into a group and then change the group owner of those files to that group? While giving those files group write permissions, of course. If that works and is a preferable solution, might be worth a change to the docs.

jcopehub commented 5 years ago

That is probably the solution with the least moving parts. I'll add the "myadmin" user to the www-group. Thanks.