This is a discussion on PLEASE HELP: How to create files and folders running my script???? within the alt.comp.lang.php forums, part of the PHP Programming Forums category; Hi All: Is there any way I can get my script to be able to create and CHMOD folders and ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hi All:
Is there any way I can get my script to be able to create and CHMOD folders and files??? I always get the following error: mkdir(TESTDIR): Permission denied in /usr/www/users... Is there a way I can enable the script to do all that by placing a ..htaccess file which contains some permissive directives? Thanks Jerry |
|
|||
|
Jerry wrote:
>Hi All: > >Is there any way I can get my script to be able to create and CHMOD >folders and files??? >I always get the following error: > >mkdir(TESTDIR): Permission denied in /usr/www/users... > >Is there a way I can enable the script to do all that by placing a >.htaccess file which contains some permissive directives? > >Thanks >Jerry > > mkdir(TESTDIR, 777); * replace 777 with the correct permissions. http://www.php.net/manual/en/function.mkdir.php I think your problem would be more to do with the permissions you are trying to create the folder in. If it's Apache on linux, the user "nobody" will need correct permissions, to be able to write to the directory. You will need to do a CHMOD on the directory. .htaccess file will not fix this as pache doesn't even have the right to write. J. |
|
|||
|
Jerry wrote:
> Is there any way I can get my script to be able to create and CHMOD > folders and files??? > I always get the following error: > > mkdir(TESTDIR): Permission denied in /usr/www/users... > > Is there a way I can enable the script to do all that by placing a > .htaccess file which contains some permissive directives? You need to change the permissions of the directory that you want to make files or directories in to be writeable by all users (ie 0777 or rwxrxwrxw) -- Chris Hope - The Electric Toolbox - http://www.electrictoolbox.com/ |