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

Permission issue when changing avatars

Discussion in 'Troubleshooting and Problems' started by KidCactus, Apr 13, 2012.

  1. KidCactus

    KidCactus Member

    When trying to change avatars on my forum I just get this error:

    Error Info
    ErrorException: rename(/path to my site/wearegamers.se/public_html/data/avatars/m/0/2.jpg) [<a href='function.rename'>function.rename</a>]: Operation not permitted -library/XenForo/Model/Avatar.php:342

    Stack Trace
    #0 /path to my site/wearegamers.se/public_html/library/XenForo/Model/Avatar.php(342): XenForo_Application::handlePhpError('/tmp/xfuJAn0O', '/storage/conten...')
    #1 /path to my site/wearegamers.se/public_html/library/XenForo/Model/Avatar.php(206): XenForo_Model_Avatar->_writeAvatar(2, 'm', '/tmp/xfuJAn0O')
    #2 /path to my site/wearegamers.se/public_html/library/XenForo/Model/Avatar.php(69): XenForo_Model_Avatar->applyAvatar(2, '/storage/conten...', 3, 192, 192, Array)
    #3 /path to my site/wearegamers.se/public_html/library/XenForo/ControllerPublic/Account.php(482): XenForo_Model_Avatar->uploadAvatar(Object(XenForo_Upload), 2, Array)
    #4 /path to my site/wearegamers.se/public_html/library/XenForo/FrontController.php(310): XenForo_ControllerPublic_Account->actionAvatarUpload()
    #5 /path to my site/wearegamers.se/public_html/library/XenForo/FrontController.php(132): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
    #6 /path to my site/wearegamers.se/public_html/index.php(13): XenForo_FrontController->run()
    #7 {main}

    Request State
    array(3) {
    ["url"] => string(53) "http://wearegamers.se/index.php?account/avatar-upload"
    ["_GET"] => array(1) {
    ["account/avatar-upload"] => string(0) ""
    ["_POST"] => array(8) {
    ["use_gravatar"] => string(1) "0"
    ["avatar_date"] => string(10) "1334320314"
    ["avatar_crop_x"] => string(1) "0"
    ["avatar_crop_y"] => string(1) "0"
    ["_xfToken"] => string(53) "2,1334320637,13b63679fe6e9c1bd0d2611bcdd80bd3ca70582e"
    ["_xfNoRedirect"] => string(1) "1"
    ["_xfResponseType"] => string(9) "json-text"
    ["_xfUploader"] => string(1) "1"

    The thing is, if I delete the avatars folder in the data folder, and then try to change avatar, the avatars folder is recreated, with the l and m folders inside (with the avatar I uploaded inside), but the s folder is not created. I've chmod'ed the data folder to 777.

  2. Floris

    Floris Guest


    chmod -R 0777 data/
    chmod -R 0777 internal_data/
  3. KidCactus

    KidCactus Member

    Even a clean installation of Xenforo ended up with this issue. Apparently something was really messed up with my site account at my host. I had to completely remove the site from their control panel, set up a new one with the same name and reinstall Xenforo once again.

    Feels like using a nuclear bomb to kill an ant, but finally the avatars can be changed.
    CyclingTribe likes this.
  4. CyclingTribe

    CyclingTribe Well-Known Member

    Sounds like a PITA - but glad you're sorted! (y)
  5. KidCactus

    KidCactus Member

    Thanks. :) And yes, a real pita; I even had to spend half an hour on the phone waiting in line to get hold of the support, since I couldn't recreate my site because of a folder that just couldn't be removed with my ftp account.
  6. CyclingTribe

    CyclingTribe Well-Known Member

    Situations like that are soooooooooo frustrating!
  7. Brandon

    Brandon Active Member

    I've been fighting this problem on my site since day 1. Is there any known workaround for avatar uploads? Every time a file is uploaded it is placed under the wrong owner. I try a chown and get permission denied.

    File uploaded > rename failed > file owner:www (correct owner is "mysite.com")
    however the file is moved to the correct folder.

    Then I try to view my avatar, and the file cannot be read or copied to another folder, etc.
  8. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    You need root access to change the owner.

    The owner and permission bits depend on your server configuration. If these are set incorrectly then you should contact your host or server person to fix them.
  9. Brandon

    Brandon Active Member

    trying. hope I can solve this soon :cry:

Share This Page