• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.4 Problem uploading attachments


Since we moved to a VPS server we have been unable to upload files.

We get message:

copy(/home/borealis/public_html/internal_data/attachments/0/335-1b9945d046299eefb5d87f56a7b4b435.data): failed to open stream: Permission denied
  1. XenForo_Application::handlePhpError()
  2. copy() in XenForo/Helper/File.php at line 253
  3. XenForo_Helper_File::safeRename() in XenForo/DataWriter/AttachmentData.php at line 264
  4. XenForo_DataWriter_AttachmentData->_moveFile() in XenForo/DataWriter/AttachmentData.php at line 223
  5. XenForo_DataWriter_AttachmentData->_writeAttachmentFile() in XenForo/DataWriter/AttachmentData.php at line 143
  6. XenForo_DataWriter_AttachmentData->_postSave() in XenForo/DataWriter.php at line 1409
  7. XenForo_DataWriter->save() in XenForo/Model/Attachment.php at line 524
  8. XenForo_Model_Attachment->insertUploadedAttachmentData() in XenForo/ControllerPublic/Attachment.php at line 204
  9. XenForo_ControllerPublic_Attachment->actionDoUpload() in XenForo/FrontController.php at line 347
  10. XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
  11. XenForo_FrontController->run() in /home/borealis/public_html/index.php at line 13
I have set 0777 to public_html//internal_data and public_html/data and all its sub folders.

The files under /home/borealis/public_html/internal_data/attachments/0/ are set to 0644

What else is missing to make this work?



XenForo moderator
Staff member
If you are sure that the directories have been recursively chmod to 0777, also check ownership (chown).
Host changed again recursively to 0777 folders


The attachments now work. The thing is that all files are also now at 0777 as they did

chmod 0777 -R internal_data/

chmod 0777 -R data/


Should they be like that or the files as 0644 leaving just folders to 0777?


XenForo moderator
Staff member
It was likely just the directory (0) under the parent directory which needed to be 0777.

It won't hurt but you can chmod the files back if you wish.