How can I write data to file in themes folders? I am getting the following error. Directory permissions are drwxrwxr--.

temporary://fileOFwrpn could not be moved/copied because the destination directory is not properly configured.

  • Who are the owner and group set as? It may be that the Apache(?) user only has read permissions. – ponies Apr 16 '18 at 22:14
  • > The server file system should be configured so that the web server (e.g. Apache) does not have permission to edit or write the files which it then executes. That is, all of your files should be 'read only' for the Apache process, and owned with write permissions by a separate user. See Securing file permissions and ownership – osman Apr 17 '18 at 0:17
  • Good point @osman. It might be in the vhost entry, or the .htaccess file controlling access. – ponies Apr 19 '18 at 16:39
  • I should also remind that write access should only be given to the public files folder, i.e. ‘sites/default/files’. Enabling write access in other folders like the theme folder would potentially create a security risk and must be avoided. Please read that official documentation before making changes to the permissions. – osman Apr 19 '18 at 16:46

Your Answer

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

Browse other questions tagged or ask your own question.