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

XF 1.0 Can't Delete Avatar

wickedstangs

Well-known member
#1
The following error occurred:

unlink(/home/gmntmare/public_html/community/data/avatars/l/0/1.jpg) [function.unlink]: Permission denied
  1. XenForo_Application::handlePhpError()
  2. unlink() in XenForo/Model/Avatar.php at line 384
  3. XenForo_Model_Avatar->deleteAvatar() in XenForo/ControllerPublic/Account.php at line 494
  4. XenForo_ControllerPublic_Account->actionAvatarUpload() in XenForo/FrontController.php at line 310
  5. XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 132
  6. XenForo_FrontController->run() in /home/gmntmare/public_html/community/index.php at line 13
 

Jake Bunce

XenForo moderator
Staff member
#2
That is a permission problem on the server. If you have shell access to your server then run these commands to ensure both directories are fully writable:

Code:
chmod -R 777 /home/gmntmare/public_html/community/data/
chmod -R 777 /home/gmntmare/public_html/community/internal_data/
Or many FTP programs can set permissions recursively, but it's slower than a shell command.
 

wickedstangs

Well-known member
#3
That is a permission problem on the server. If you have shell access to your server then run these commands to ensure both directories are fully writable:

Code:
chmod -R 777 /home/gmntmare/public_html/community/data/
chmod -R 777 /home/gmntmare/public_html/community/internal_data/
Or many FTP programs can set permissions recursively, but it's slower than a shell command.
Do I make all files and directories?
 

Jake Bunce

XenForo moderator
Staff member
#7
I did only the data and internal folder and it didn't work... So I did all directories and it worked?
It is definitely not necessary to do all directories. But it is necessary to recursively set permissions (which includes all subdirectories) for data/ and internal_data/.