Is it chown www-data:www-data ? Cause I just want to add crontab to automatically fix permission and just use user root for sftp upload.
Stock / standard EasyEngine is www-data:www-data
We actually do [user]:www-data with a specific user as owner for servers that have more than one site on them; and have scripts to chown to www-data:www-data for updates, etc and then back to [user]:www-data after updates.
So it’s safe to modify htdcos files, upload new files using root account?
Def would not leave root as owner.
What do you mean by that exactly?
If you upload the files as root, don’t leave root as the owner of the files. Change them to www-data or another user.
OK, I will just create a cron to set them automatically:
*/5 * * * * /bin/chown -R www-data:www-data /var/www/