File Attachments fail


When creating a new Campaign, tab/stage 3 is to attach one or more files.

However, selected files are not attached successfully. The campaign log shows messages like:

Attachment MPKS2071.JPG does not exist

…for each message to be sent. Messages are not getting sent.

In the config we have the default: /tmp is used for uploads. In that directory I see files:

# ls -lht /tmp | head -30
total 3.4M
drwxr-xr-x 2 root       root         6 Feb  1 12:34 hsperfdata_root
-rw------- 1 phplistusr phplistusr 27K Feb  1 12:30 sess_e5db68f03f7ba4e1833618d0e7925ac8
-rw------- 1 phplistusr phplistusr 30K Feb  1 12:20 sess_69ca289b1d39c6ffe63269a86e14807d
-rw------- 1 phplistusr phplistusr 30K Feb  1 12:10 sess_96fb2dfa8c013b680d8b742a5b5ae2f6
-rw------- 1 phplistusr phplistusr 30K Feb  1 12:00 sess_c13eedc86f8d3d015a17bf40a5f26765
-rw------- 1 phplistusr phplistusr 30K Feb  1 11:50 sess_f90e185dadf469676f3e6af76cb8887a
-rw------- 1 phplistusr phplistusr 30K Feb  1 11:40 sess_39e7d6ccde40070de7f07f78da3fa978

(Most of the files you see have the same size because in fact it’s the same file: multiple attach efforts with different test campaigns using the same test file.)

If I understand right, these files are uploaded with “phplistusr” as the owner:group, and read/write access is restricted to this user only, so the phplist application (running under apache user) cannot access them to add the file(s) as attachments.

I have not been able to find a phplist setting to configure attachment file owner:group and/or file permissions (eg. 666).

We are using v3.6.10 on CentOS 7.

Can you please help me find a solution to allow attachments work right?


@Appletech Those files are php session files, not your attachments.

You should create your own attachment directory, separate to /tmp, and use that by changing the line in config.php. Using /tmp is not reliable because the system can delete files.

Thank you for your prompt reply.

I have followed your advice and it worked great. Attachments are now working without issues.

Case closed.

Thanks again,