Invalid File Permissions pdf is not writable

Hello ,
I have migrated from a working version 4 and found this issue via Health check, have tried everything to clear this, i have looked over the file permissions in the docs but this was a bit unclear and I figured there was a simple solution as V4 i never had any permission issues. This issue happens on every pdf, invoice, recurring, and even deleted pdf.

not writable|386x500

Thanks

@jeffrey007

Most likely you have queues configured under a different web user, the fix here is to chown the public/storage directory recursively to the webuser.

Hello David,
I have done this again, and it cleared the error using:
chown -R webuser.psacln /var/www/vhosts/sitename.com/httpdocs/billing1/public/storage, then i setup a new recurring invoice and yet another error, file_permissions1

thanks

@jeffrey007

I think the first thing needed, is to get the queue’s running as the webuser. it looks like a diffferent user is writing files to your directory. the entire public/storage and storage directories should be resursively chowned by the web user.

Hi David, Im having the exact same problem. Everytime a new recurring invoice is created I get this file permission error. Im using CWP (CentOS Web Panel, runs on Centos 7) as my host and noticed in the file browser that the newly created invoice was made by root instead of the webuser (in this case “fusionit”) which is the problem I believe.

So…how do I run the queue as the webuser (fusionit)?

@theryno

Most like you are running your cron/queue as root, and not the webuser, you’ll want to ensure the webuser is executing the commands via cron/queue