Jump to content
  • 0

logs_blesta files created as wrong user.


coreyman

Question

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?

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0
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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...