Permission issue when changing avatars

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.

Thoughts?
 
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.
 
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.
 
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.

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.
 
Top Bottom