XF 1.4 avatar bug

JackIsi

Member
hi, on my site i got a bug with avatars, i recenetly changed domains and servers and now new members who try to change their avatars are broken, people who already had avatars are unable to change them, they just stay the same, please can you try help me. all permissions are correct.
 
i use centos 6, and no im not using php-fpm.
i have this problem way to long now and i searched all over the internet, but i can't find any solution :(

thanks for ur suggestion :)
 
It could be an issue the upload_tmp_dir php.ini setting.

Whatever it is, it appears to be related to your server move and as you manage your own server, you're going to have to investigate to track it down and resolve it.
 
this is in the error log when i try to upload a attachment: ErrorException: copy(/www/seductivemodding.com/internal_data/attachments/0/15-7bae59d799a50b33497a46a7cb6fe713.data): failed to open stream: Permission denied.
 
Are you sure that all files are owned by the HTTP server? If any one of them is owned by anything other than the HTTP server then you will also have this issue.
To make sure, you can go into the /internal_data and /data and do a chown -R http_server_owner:http_server_owner_group where the two parameters of http_server_owner* are the user and user group that the HTTP server is set to run as.
 
Are you sure that all files are owned by the HTTP server? If any one of them is owned by anything other than the HTTP server then you will also have this issue.
To make sure, you can go into the /internal_data and /data and do a chown -R http_server_owner:http_server_owner_group where the two parameters of http_server_owner* are the user and user group that the HTTP server is set to run as.
are u able to help me via teamviewer ?
 
What OS are U using?

CentOS 7 or Debian 8? And do you use php-fpm?
It might be a problem with PrivateTmp

I also had issues with that.
Now I have PrivateTmp=false in php-fpm and that works perfect.

Or anything that checks the files on upload might be a possible problem.
where is that file located on centos 6 ?
 
where is that file located on centos 6 ?
Code:
/etc/systemd/system/php-fpm56.service
Adjust to the php version you are running.

Oh, just read it again and see it was for CentOS 6
The above is for CentOS 7
I don't know where it was on CentOS 6.
Just search for the filename.

But I don't think you can have that problem on CentOS 6
 
Last edited:
In my early CentOS builds, the files were owned by the web server (possible usernames would be apache, httpd, or nginx). Later on, the proper ownership changed to the user account for the respective site (possible username may be the ftp/sftp username).

To test, upload a test php file into your /data directory and then attempt to run it from your browser. If it works, then go to the command line and see what it's owner:group combination is. Type this within the data directory:

ls -al

Note whatever is shown for your uploaded test php file for permission and ownership.

Then create a test user in your xenforo installation. Login to it from a browser you don't normally use and upload an avatar for it, make sure you can view it normally from your site as any user would.

Then go back to the command line and find where the avatar file is. Does it's permissions and ownership match your test php file? If yes, then try going back to your browser and see if you can replace the avatar on your test user. If it works, then you know what the proper ownership and permissions should be on all of your avatars.
 
Top Bottom