This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.
If Apache is running as www-data:www-data then that is what the ownership needs to be to run the application. For my development environment, I set Apache to use myuser:mygroup, that way when I can edit the files easily and run the files as well. Don't mix-and-match user:group ownerships.
For production, use the standard Apache user and group (usually www-data).
Yes, you can set the Apache user and group with the envvars file, usually located at /etc/apache2/envvars
.
I don't think you can set it with .htaccess, as it's an environment variable that's being set in envvars.
In my development environment, I edit the envvars file and set the user and group to my user and group. Then I chown -R myuser:mygroup october_project/
Hello! I had to live with this problem for a period, but now i have found the definitive solution on this page: https://octobercms.com/blog/post/running-october-aws-part-2
Basically this commands:
sudo usermod -a -G www-data ubuntu
Logoff and login in the server to update the permissions
sudo chown -R ubuntu:www-data /var/www
sudo chmod 2775 /var/www && find /var/www -type d -exec sudo chmod 2775 {} \;
find /var/www -type f -exec sudo chmod 0664 {} \;
Everything is explained in the link above. I hope it could help.
1-3 of 3