ryanz Posted January 5, 2010 Share Posted January 5, 2010 We're having problems with piped attachments not opening in the Support Desk. When we upload an attachment from the Panel and by POP they work fine but emailed attachments appear but have 0 size and cannot be opened. So far we established that the attachments are correctly loaded to the /attachments folder Attachments uploaded in the Support desk are created in /attachments with the following permissions: 600 apache:apache somefilename.jpg (These can be opened) Attachments received via the pipe.php script are created in /attachments with the following permissions: 600 ftpuser:psacln somefilename.jpg (These cannot be opened) Attachments received from POP downloading to support work correctly. We have to run the pipe.php with owner permissions of ftpuser:psacln otherwise Postfix does not allow the pipe to function. We can view the files from /attachments only if they have: 600 apache:apache somefilename.jpg 644 ftpuser:psacln somefilename.jpg Any advice on this? WHMCS v 4.1.2 0 Quote Link to comment Share on other sites More sharing options...
Lawrence Posted January 5, 2010 Share Posted January 5, 2010 Sounds like a bug, either in your PHP configuration or WHMCS itself. Files handled by a PHP script should be owned by the same user/group the PHP script ran as. The ideal chmod for these files is 644. 0 Quote Link to comment Share on other sites More sharing options...
ryanz Posted January 5, 2010 Author Share Posted January 5, 2010 Sounds like a bug, either in your PHP configuration or WHMCS itself. Files handled by a PHP script should be owned by the same user/group the PHP script ran as. The ideal chmod for these files is 644. I agree, but I'm not sure why they are only saved this way when the email piping is used. Manual and POP attachments are ok. 0 Quote Link to comment Share on other sites More sharing options...
ChrisGooding Posted January 7, 2010 Share Posted January 7, 2010 although the files ideal chmod is 644, we have had this and found that setting the folders to 777, but without applying it to contents solved the issue. Of course, to solve the issue of how they are saved, you need to set it so that the files inherit user/group permissions, if you want to go that way that is. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.