Jump to content
  • 0

logs_blesta files created as wrong user.


Question

Posted

So I checked php7.1-fpm configuration and it's running as www-data. Files inside logs_blesta are being created as the root user and as such php scripts running through php7.1-fpm can not access the files. This causes lots of issues such as password reset emails not going out, unable to change client product pricing etc. I set the sticky bit on logs_blesta hoping that would solve my www-data problem by preserving permissions in the directory but it doesn't, files still get created as root owner. Every day I am stuck going in and

chown -R www-data:www-data logs_blesta

so I can perform administrative actions.

drwsr-xr-x 2 www-data www-data   4096 Mar  4 14:33 .

Any ideas why files are being created as root and not www-data?

2 answers to this question

Recommended Posts

  • 0
Posted
10 minutes ago, coreyman said:

So I checked php7.1-fpm configuration and it's running as www-data. Files inside logs_blesta are being created as the root user and as such php scripts running through php7.1-fpm can not access the files. This causes lots of issues such as password reset emails not going out, unable to change client product pricing etc. I set the sticky bit on logs_blesta hoping that would solve my www-data problem by preserving permissions in the directory but it doesn't, files still get created as root owner. Every day I am stuck going in and


chown -R www-data:www-data logs_blesta

so I can perform administrative actions.


drwsr-xr-x 2 www-data www-data   4096 Mar  4 14:33 .

Any ideas why files are being created as root and not www-data?

Is your cron job running as root? Did you install as root? Cron should run as the same user as your web server runs as.

  • 0
Posted
1 hour ago, Paul said:

Is your cron job running as root? Did you install as root? Cron should run as the same user as your web server runs as.

Ahh ok I didn't know cron was creating those files. I'll change this. Thank you!

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...