Question
December 31, 2007 at 12:34 PM
im patrickb8man

PHP Permission to Uploaded File

by im patrickb8man . Updated 18 years, 8 months ago

I recently took over the website for my company and it contains PHP code which I am still very unfamiliar with but am in the process of learning. On the site clients can upload data files (.txts) by browsing for the file and clicking “submit” (within a form) which activates a PHP file that has the uploaded file stored in a specific folder on the site’s server so we may download them later. The problem is when we go to download the files from the server we get this:

test_site_upload.txt: Permission denied

Requested action not taken (e.g., file or directory not found, no access).

I inquired what this meant or what caused this with our host and they said:

“The issue is that your uploader script is uploading the filees under the username of the web server itself. You need to dictate within the code a proper permissions/ownership variable so that the files are uploaded as your username.”

I’ve verified that the destination folder has full permissions (777) but the problem persists. I’m stumped, help would be much appreciated.

This discussion is locked

All Comments