Forum Moderators: coopster

Message Too Old, No Replies

Write permission to temporary and target (root) directory error.

how to set write permissions on folders

         

bobhoskins

11:04 am on Jul 21, 2005 (gmt 0)

10+ Year Member



when trying to 'upload' a file to my root directory, i'm getting this error -

Warning: Unable to create 'c:/program files/Apache Group/Apache/htdocs':
Permission denied in c:\program files\apache group\apache\htdocs\do_upload.php on line 5

the book i'm learning php from says -

"the php user (the user under which php runs, (such as 'nobody' or 'www' or'joe') must
have write permissions in the temporary directory as well as the target directory for the file."

but it doesn't advise on how to set write permissions on folders.

my temporary directory is set as c:/Windows/temp and the root directory is
c:/program files/Apache Group/Apache/htdocs - the paths are both correct and i belive it doesn't
matter about the forward/backward slash thing. i don't know what my php user name actually is and also
not sure if this is more of an apache web server problem.

hope i've put enough info down - any ideas?

jatar_k

3:51 pm on Jul 21, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



what I sometimes do

1. I don't use the root dir
2. I use a dedicated directory created as a staging point for uploads. File is uploaded to this dir and then moved to its funal resting place once I do a bunch of things with it
3. when I have permission problems, you can create the directory using php, though this sometimes gives the same problems
4. ftp in and adjust the permissions on the folder, though this looks like it could be on your local machine
5. in windows I think you can navigate to the directory, right click > properties > security tab, I think that is the place you do it