skip to Main Content

I use standard stack logging and created files has wrong owner. I need to have www-data owner, but files has root owner. How can I fix this? Laravel version is 5.8 under Apache2+Php.

2

Answers


  1. Chosen as BEST ANSWER

    Answer was simple. I changed owner of all directories to www-data. I do it early , but not for all directories.


  2. Edit the following file as root: /etc/apache2/envvars

    using the command:

    sudo nano /etc/apache2/envvars
    

    change the user and group to yourself if there is only one user and you will never have permissions problems again.

    I.E., if you are only logging in and running the server as user ‘your_username’:

    export APACHE_RUN_USER=your_username
    export APACHE_RUN_GROUP=your_username
    

    Restart the server (if unsure, just reboot) and you are good to go.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search