Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Failed to move uploaded file to target destination when editing Thumbnail pic
jone68
New
I get the following error when i edit and save thumbnail picture:
Failed to move uploaded file to target destination (/home/user/public_html/site/public/uploads/userpics/044/pJRSOVGDQB5LO.jpg).
It's not a permission problem, i already tried setting up a full 777
permission uploads
directory and it's parents. any idea?
Thanks,
0
Comments
So in that case you look in the Vanilla source and try to figure out why it's giving you that exact error message. You can try and search for that exact text in the source.
There was an error rendering this rich post.
Kind of obvious question but does the folder
userpics
have the same permission?@UnderDog Thanks for the hint. I found this:
But i have know idea what that mean i'm kida new for PHP
@HalfCat Yeah
userpics
have the same permission777
any update? Exact problem
What permissions do you have on directory /home/user/public_html/site/public/uploads/userpics/044?
My shop | About Me
The problem is that Vanilla creates a new directory for every new thumbnail, and that directory has improper permissions. There is no way to fix this by changing the permissions on the directory since its only used for the one image.
you can apply permissions to sibling folders within userpics tho
There was an error rendering this rich post.
That sounds odd to me. As far as I know, the directory is created by the User which is assigned to the Web Server, who is then its owner. Unless the server is configured with a very strict default permission mask (umask), the directory should at least have write permissions for the owner. For example, my server creates them with permissions set to 755, which would allow the owner to write in it.
@achu, could you please verify the permissions of the directory I indicated? That could shed some light on what's happening.
My shop | About Me
This was discussed a bit over here:
http://vanillaforums.org/discussion/comment/172006/#Comment_172006
Change line 222 at ./library/core/class.upload.php from
if (!move_uploaded_file($Source, $Target))
to
if (!copy($Source, $Target))
The file is already present on the server, we're not trying to move an uploaded file, we're just copying the one that exists.