I've been working on a problem for hours now, have found countless forum threads (here and elsewhere) that sound similar to my situation, but fail to actually help me. I am dealing with a file upload script that has worked fine on all servers so far, but gives me trouble on my current project.
The script is part of a mini-CMS where users are prompted to enter a name for a folder. After ascertaining that the name contains no illegal characters my script successfully creates the folder and chmods it to 0777.
Using an FTP client I can see that folder, open it, but can not store data in it ("Upload command fails"; I am using UltraEdit). That alone seems strange.
Upon checking via PHP whether the directory exists, I receive TRUE as output. However, if I try to copy a file to that folder (copy) or try to move it there (rename or move_uploaded_file), I am suddenly out of luck — nothing.
OS on the server in question is Linux 2.6.25.5-1.1-default. Safe-mode is active.
Now the strangest part: If I use my FTP client to create a folder and set it to 0777, my script does as it is supposed to.
It seems obvious that there's some kind of user/permission conflict having its way with me, but what exactly is going on and, more importantly, how do I get around to actually using my script according to my plan?
Later,
Christian