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

XF 1.4 some avatars are broken images

xmlxp

Active member
#1
Hi All

I moved my forums backup to a new server and after restoring I found some (not all) members avatars are broken images. data and internal_data folders permissions are 777

Before I move I upgraded mysql to MariaDB then I checked every thing including avatars and every thing is working fine on the old server then I made a backup then moved it to the new server
 

Brogan

XenForo moderator
Staff member
#2
Do the images exist on the new server?
It's possible the restore is incomplete.

If they do exist, then it could point to permission (chmod) or ownership (chown) issues.
 

xmlxp

Active member
#3
This is the out come when I request the url of the broken avatar
Not Found
The requested URL /community/data/avatars/s/77/77556.jpg was not found on this server.

How its possible the restore was incomplete? I didn't receive any error message during the restoration process !
 

xmlxp

Active member
#4
I checked the database sizes on both servers.
On the old server its 4.6 GB
On the new server its 4.5 GB

What could cause incomplete restore? is there any settings I should do on the new server to make sure the restore is complete?
 

Mike

XenForo developer
Staff member
#5
This relates to the file system rather than the database. I don't think we could really comment what would cause this as it would depend on the method you used to transfer everything.
 

Mike

XenForo developer
Staff member
#7
What do you mean by "backups"? You need to backup the database and the file system (by default, that would be the directory containing XenForo). If you don't backup the files, you won't have attachments, avatars and other data.
 

xmlxp

Active member
#8
This time I made a backup for the whole user account which includes database and all folders and files of the root directory and restored it to the new server here is one of the broken avatars:

Not Found
The requested URL /community/data/avatars/s/55/55255.jpg was not found on this server.

when I searched for that avatars 55255.jpg in FTP I foundout it exist but have permission of 666 !

BA.png

I tried to change the permission to 777 but it says
Response: 550 Could not change perms on 55255.jpg: Operation not permitted !

How to fix this?
 

xmlxp

Active member
#11
I did
chown -R vbcom:vbcom /home/vbcom/public_html/
chown -R vbcom:nobody /home/vbcom/public_html/

and that fixed the problem
 

xmlxp

Active member
#13
I am having now a broken thumnails attachments (but the full image attachments is ok) and I have to chown to fix the broken thumnails attachments that are already posted but the problem keep happening again and again with every new thumnails attachments when posted and I have to chown again and again to fix the problem!!

I am running xf143, Centos 7, Apache2.4, MariaDB 10
 
Last edited:

xmlxp

Active member
#15
Hello Tracy

yes SElinux is installed but its also installed in my old server Centos 6 and never caused a problem. Yes I have root access to the server

Edit: SELinux status: disabled
 
Last edited:

xmlxp

Active member
#16
another issue in the server error log:
ErrorException: fopen(/home/vbcom/public_html/community/internal_data/sitemaps/sitemap-1465647229-7.xml): failed to open stream: Permission denied - library/XenForo/Deferred/Sitemap.php:210
 

Tracy Perry

Well-known member
#17
You say you are using CentOS, MariaDB and Apache 2.4. I'm going to assume since you are using Apache and not nginx, OLS or LiteSpeed you are using a cPanel setup?
And what user/group is 99? It looks like nobody:nobody on my CentOS box.
 

Tracy Perry

Well-known member
#19
If you look at your image, that file you highlighted was changed to nobody:nobody as the owner. Either you have script (cron) running that does that or your PHP processor changes it (and if it keeps redoing the same ones, it's a server issue).
if nothing else, you can set up a script to run in a cron to reset the ownership every few hours - but that's only a band-aid solution. You need to find out what on y our server is changing the ownership.
You could use audit to check what is changing the files possibly
https://www.digitalocean.com/community/tutorials/how-to-use-the-linux-auditing-system-on-centos-7
 

xmlxp

Active member
#20
when I do
chown user:user /home/user/public_html
my forums broken and I get this message:
Forbidden
You don't have permission to access /community/ on this server.
Server unable to read htaccess file, denying access to be safe
Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.

I am using the default htaccess out of the box of xenforo package !!
 
Last edited: