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

Server Error on Import

Discussion in 'Installation, Upgrade, and Import Support' started by melbo, Jul 27, 2011.

  1. melbo

    melbo Well-Known Member

    XenForo 1.0.4
    PHP 5.3.6
    MySQL 5.1.56
    Importing from vB 3.8.7 PL2

    I've successfully imported my vB site to xF since early betas and never had this problem.

    I get to:
    Import External Data (all good)​
    Import Attached Files (error)​

    And then get this error:

    Admin Control Panel - XenForo Test

    Server Error

    rename(/home/*********l/public_html/forumtest/internal_data/temp/xfWxJllg,/home/********/public_html/forumtest/internal_data/attachments/0/3-b42e23f0044e84edd021d5f37e0c6943.data): Permission denied
    1. XenForo_Application::handlePhpError()
    2. rename() in XenForo/DataWriter/AttachmentData.php at line 207
    3. XenForo_DataWriter_AttachmentData->_moveFile() in XenForo/DataWriter/AttachmentData.php at line 183
    4. XenForo_DataWriter_AttachmentData->_writeAttachmentFile() in XenForo/DataWriter/AttachmentData.php at line 117
    5. XenForo_DataWriter_AttachmentData->_postSave() in XenForo/DataWriter.php at line 1295
    6. XenForo_DataWriter->save() in XenForo/Model/Attachment.php at line 292
    7. XenForo_Model_Attachment->insertUploadedAttachmentData() in XenForo/Model/Import.php at line 1394
    8. XenForo_Model_Import->importPostAttachment() in XenForo/Importer/vBulletin.php at line 2216
    9. XenForo_Importer_vBulletin->stepAttachments() in XenForo/Importer/Abstract.php at line 77
    10. XenForo_Importer_Abstract->runStep() in XenForo/ControllerAdmin/Import.php at line 166
    11. XenForo_ControllerAdmin_Import->_runStep() in XenForo/ControllerAdmin/Import.php at line 218
    12. XenForo_ControllerAdmin_Import->_startStep() in XenForo/ControllerAdmin/Import.php at line 161
    13. XenForo_ControllerAdmin_Import->actionStartStep() in XenForo/FrontController.php at line 310
    14. XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 132
    15. XenForo_FrontController->run() in /home/********/public_html/forumtest/admin.php at line 13
    Any ideas?
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    That is a permission error. You need to make sure both data and internal_data are fully writable.

    If you have shell access then you can run this command to recursively set permissions in those directories:

    chmod -R 777 /home/********/public_html/forumtest/data/
    chmod -R 777 /home/********/public_html/forumtest/internal_data/
  3. melbo

    melbo Well-Known Member

    Thanks Jake.
    Theywere both CHMOD to 777 before the import began. I just rechecked and everything (except for files) is 777 within those 2 directories, recursively.

    It seems to fail while trying to write to the 0 directory under internal_data/attachments/

    I have re-downloaded and re-uploaded the complete (not just upgrade) package a few times now and keep stalling on this point. Anything else for me to try? It's odd that this is the first time I've encountered this problem.
  4. melbo

    melbo Well-Known Member

    Would it matter that the owner/group is apache apache for the directories that the importer is attempting to write (rename) to?

    I'm getting the same error at the same point although everything in those two directories is now CHMOD 777.
  5. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    It is clearly a permission problem on the server.

    Maybe check the ownership bits as well as the permission bits. I use this command to fix ownership if there is a problem:

    chown --recursive --reference=/PATH/TO/DIR/WITH/CORRECT/OWNERSHIP/ /home/********/public_html/forumtest/data/
    This command must be run as root. You need to change --reference to point to a directory or file with correct ownership. It will copy the ownership bits from --reference and recursively apply them to the specified path.
  6. melbo

    melbo Well-Known Member

    Each time I re-start the importer, it creates a new file under /internal_data/temp/ with attributes of 600. I think when the importer tries to then rename this file it triggers the permission denied.

    Is this a security setting on my server? I have CHMOD and CHOWNed these directories as root and that takes care of the existing files but not each new one created on import.

    Is it normal for each new file under temp to be created with 600?
  7. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    I am still voting for an ownership / permission problem. A lot depends on how your server is configured which is not my strong suit. You can try posting in the Server Configuration forum. Or contact your host or server person.

    600 doesn't sound right. That would allow read/write for the owner of the file and no one else.
  8. TheBigK

    TheBigK Well-Known Member

    I'm getting a similar error and now checking into file permissions. What surprises me is that what could change the file permissions? The only significant thing I did in the last few days is install the LightSpeed plugin in WHM and switched over to LightSpeed web server.

    Until now, I've never had a single problem installing or upgrading plugins. Now I'm getting all these errors.

    What's the root cause behind changing of the file ownership?

Share This Page