"Error: Internal error, could not move the file."
Hi everyone - I've been having a bit of trouble with the 'FileUpload' plugin.
Did a lot of reading up on it and it's associated problems but still can't get it to work.
Initially I was getting an error that was due to File Permissions on the folders - and for some reason when I tried to chmod the folders to 777 in FileZilla it wouldn't let me. The "ownership" of the files was set to "apache" by the script instead of myself.
My web-host changed the ownership back to myself on these folders and changed them to 777 - Now I am getting the "Internal error, could not move the file." problem. I've checked, all folders and subfolders are 777 and the ownership is correct - However it seems that whenever I try to upload a file the script creates it's own folder (such as '4a' or something) but the permissions on this are only set to 755, and once again the ownership on these is not myself.
ANYONE have any solutions pleaase?
Comments
Yes I ran into this problem when I transferred everything over to a new server.
The problem is still in the ownerships of the files. My webserver uid is "www-data" which I think is pretty standard on apache2 installs on Ubuntu. You set the ownerships of the folders so the webserver can write to it.
the FileUpload folder has to look like this (so you can still get in):
drwxrwx--- [your username] www-data blah blah blah FileUpload
you can set that permission by using the command: sudo chown [your username]:www-data FileUpload
(from the FileUpload folders parent dir, of course)
since all the folders inside FileUpload are chmodded to 755 as you described, just set ownership to
www-data:www-data (this way, www-data is the owner and not just group member, and has write permissions)
If this still bothers you, there is a way to make all new files / folders created with a set of specified permissions, but I don't know how to do it. (google umask, I believe)