I have an issue where PHP should generate a PDF in a folder called 'invoices' when a customer completes a purchase. This was working fine and then stopped without any changes to the PHP scripts.
After a bit of investigation (see this stack overflow thread for the details) it seems that the problem is that the PHP is not able to write due to file ownership issues. Files cannot be generated when the folder has ownership 'cpanelusername:cpanelusername' but are successfully generated when the folder has ownership 'nobody:cpanelusername'. However, the correct ownership of folders needs to be 'cpanelusername:cpanelusername'.
I have been recommended that I add 'nobody' to the 'cpanelusername' group so that PHP is then part of this group.
So a few questions:
Is this likely the correct solution and are their any security issues with doing this?
How do I check what members already exist in the 'cpanelusername' group? Note I can just about use WHM terminal with step-by-step instructions.
How do I add 'nobody' to the 'cpanelusername' group using WHM terminal?
Thanks for your help
After a bit of investigation (see this stack overflow thread for the details) it seems that the problem is that the PHP is not able to write due to file ownership issues. Files cannot be generated when the folder has ownership 'cpanelusername:cpanelusername' but are successfully generated when the folder has ownership 'nobody:cpanelusername'. However, the correct ownership of folders needs to be 'cpanelusername:cpanelusername'.
I have been recommended that I add 'nobody' to the 'cpanelusername' group so that PHP is then part of this group.
So a few questions:
Is this likely the correct solution and are their any security issues with doing this?
How do I check what members already exist in the 'cpanelusername' group? Note I can just about use WHM terminal with step-by-step instructions.
How do I add 'nobody' to the 'cpanelusername' group using WHM terminal?
Thanks for your help
Last edited by a moderator: