PLEASE HELP: How to create files and folders running my script????

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 ...


Go Back   Usenet Forums > PHP Programming Forums > alt.comp.lang.php

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 08-02-2004
Jerry
 
Posts: n/a
Default PLEASE HELP: How to create files and folders running my script????

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
Reply With Quote
  #2 (permalink)  
Old 08-02-2004
James Smith
 
Posts: n/a
Default Re: PLEASE HELP: How to create files and folders running my script????

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.
Reply With Quote
  #3 (permalink)  
Old 08-02-2004
Chris Hope
 
Posts: n/a
Default Re: PLEASE HELP: How to create files and folders running my script????

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/
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 01:56 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0