Do you have a question? Post it now! No Registration Necessary. Now with pictures!
January 22, 2008, 6:47 am
rate this thread
Re: mkdir permission issue
Lots of options, here are a couple:
1. why not make the folder outside the webroot?
for example, if your webroot maps to /home/joebloggs/mywebsite on
your server, instead of making the directory under (e.g. /home/
joebloggs/mywebsite/myuploadir), put outside the webroot (e.g. /home/
joebloggs/myuploadir). PHP will still be able to get the files but
they will no longer be accesible via a URL.
You'll probably need to modify the file permissions of the parent
directory to ensure your script can create the upload directory in the
2. When you create the directory, also create a small .htaccess file
in the same directory with contents something like this:
Deny from all