tarsus
11-15-2006, 03:45 PM
I'm migrating a site to a new hoster - Crystaltech.com - and I'm trying to make a file upload script work. The script uses the simple move_uploaded_file() function (or copy(), I've tried both), but the copy fails because of write permissions on the directory I'm trying to upload to.
In my Crystaltech control panel, I can edit and add file permissions on any directory, and I've been told by a customer service rep that if I give "Everyone" write permissions, the script will work (which it does), since my application falls under that user group. However, I don't want this to be a universally writable directory. I can add a user and give that user write permissions to the directory, but my question is: How do I then utilize that authentication with PHP? Is it even possible? Or is there simply the write permissions my script has as an "everyone" user, and that's it? I figure there must be some kind of practical application to being able to control these file permissions through my host's control panel, or they wouldn't bother including it.
In my Crystaltech control panel, I can edit and add file permissions on any directory, and I've been told by a customer service rep that if I give "Everyone" write permissions, the script will work (which it does), since my application falls under that user group. However, I don't want this to be a universally writable directory. I can add a user and give that user write permissions to the directory, but my question is: How do I then utilize that authentication with PHP? Is it even possible? Or is there simply the write permissions my script has as an "everyone" user, and that's it? I figure there must be some kind of practical application to being able to control these file permissions through my host's control panel, or they wouldn't bother including it.