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

Ask a Question related to PHP Development, Design and Development.

  1. #1

    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
    Jerry Guest

  2. Similar Questions and Discussions

    1. Accessing files/folders inside other application folders
      How can I have an asc file from one application read text files in another applications directory? I have multiple applications creating text...
    2. Create folders
      http://www.tutorial-web.com/asp/fso/filesystem.asp sorry, it's not md and cd... you need to use FSO.
    3. Create folders
      create the folder w/ asp... When you call the recordset.addnew code you can do something like <% licensePlate = request.form('licensePlate')...
    4. shell script copies folders, but not files
      meanstoanend00@yahoo.com (jamie) wrote in message news:<b83b8ff8.0308291009.2b8f762f@posting.google.com>... That seems very strange. I just tried...
    5. Making folders and sub-folders and files NOT read-only
      I select a folder. I right click my mouse on that folder and select properties. I uncheck the Read Only checkbox. I click on Apply. I check the...
  3. #2

    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.

    [url]http://www.php.net/manual/en/function.mkdir.php[/url]

    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.
    James Smith Guest

  4. #3

    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 - [url]http://www.electrictoolbox.com/[/url]
    Chris Hope Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139