Usermod VS setfacl

Hi !

I’ve read here:

that there are 3 options for www-data to access folders and files in a user’s public folder:

  1. add www-data user to USER group:

usermod -a -G USER www-data

  1. use setfacl:

cd /home/USER/web/DOMAIN/public_html/
setfacl --modify user:www-data:x folder/

  1. Looking at public_html, it’s owned by user:www-data.
    Then, why not giving the same user:www-data ownership to files and folders in it?

What would be the most reasonable option? :thinking:

Thanks :+1:

Because it is not needed.

thanks @eris, I know it shouldn’t be needed …

but at the same time, I got so many errors in nextcloud with user:user, that i tried user:www-data in dev, and i really received less logs … especially with apcu - and nextcloud behaviour seemed then less chaotic …

what kind of problem one of these 3 possibilities could generate?

By default php runs under the user unless you have changed or used modphp there should be no reason why next cloud is complaining

no, i haven’t changed the php default
but i did try one install with mod_fcgi

Then php should run under the user and not www-data

1 Like

thanks @eris for your always nourishing answers

share the logs if you want more help

1 Like

thanks @jlguerrero that’s a nice thing to ask, i’ve destroyed the first nextcloud instances on hestia, as they were not working fine.

so far, i’ve tried option 1 and 2 in two different dev installs.
I could come back here with results, if something comes out.

In fact, i’m asking the first question in quest of understanding hestia’s functioning compared to default apache virtual hosts