Just curious, any reason you don't use the mkdir function/
mkdir ("/path/to/my/dir", 0700);
> -----Original Message-----
> From: Simon Ritchie [mailto:[EMAIL PROTECTED]]
> Sent: Monday, August 12, 2002 2:50 PM
> To: [EMAIL PROTECTED]
> Subject: RE: [PHP] exec / mkdir question
> > > i'm using the following code to create a directory :-
> > >
> > > $temp = exec("mkdir $path");
> > >
> > > it doesn't work...
> > >
> > > i've validated the $path var which is correct. i suspect it is a
> > > permissions issue.
> > >
> > > what should i look for to resolve this?
> > Try using the mkdir function:
> That is good practice, but if the problem is with the permissions, the
> program will just be better written when it fails.
> A note of the error message and some information about the host
> would help. However ...
> The user running the PHP script needs to be able to create the file. If
> this is a UNIX system and the web server is run by the user nobody, then
> that user needs write access to the directory which will contain the file.
> To grant that access, your user (the one you, er, use to connect to the
> server) must own the directory
> The worst case is when your user and the web server user are not
> in the same
> group. In that case, you will need to grant write access to all users.
> This introduces potential security risks - any user can also remove or
> rename files in that directory.
> Simon Ritchie
> Download my introduction to PHP for $25:
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php