I'm getting the following error message:

"You must change the sites/all/libraries/mpdf/graph_cache permissions to be writable, as mPDF requires write-access to that directory."

The problem is that it is writable by apache and it has the correct permissions.

drwxr-xr-x.  2 hpadmin apache      22 Jul  2 10:51 graph_cache
  • 1
    Did you set the permissions recursivly for the folder an not for something inside it? – schlicki Jul 16 '15 at 6:03

Actually, it looks like it's not writeable by the "apache" user. It's read only. It is writeable by the "hpadmin" user though. Currently "hpadmin" is the owner and "apache" is the group.

drwxr-xr-x.  2 hpadmin apache      22 Jul  2 10:51 graph_cache


drwxrwxr-x.  2 hpadmin apache      22 Jul  2 10:51 graph_cache

You can adjust the permission to group writeable with

chmod 775 sites/all/libraries/mpdf/graph_cache

or change "apache" to the owner with

chown apache:apache sites/all/libraries/mpdf/graph_cache
| improve this answer | |
  • Thanks David. I tried changing it to 775 and even 777 but it still gives me that error message even after flushing the cache. – chap Jul 16 '15 at 5:34
  • Check the parent folder permission also – David Thomas Jul 16 '15 at 13:16
  • My directory looks like public_html/sites/all/libraries/mpdf/graph_cache isn't it a security risk if I make the entire public_html directory writable by apache? At the moment it is read only. – chap Jul 20 '15 at 1:28
  • Not the whole tree, just the permissions on the mpdf folder – David Thomas Jul 20 '15 at 12:41
  • David see my answer. It turns out it was SELinux that was overriding file permissions. SO frustrating. Thanks for your help. – chap Jul 31 '15 at 1:31

It turns out that the problem was the server was using SELinux that was overriding file permissions made using chmod. Hence, even with 777 permissions the file wasn't writable. The solution was to contact the hosting company and get them to change the configuration of SELinux.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.