Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2003
    Location
    USA, FL
    Posts
    253

    Exclamation File Directory Question

    What I am trying to do is create a directory for users. The issue is
    I am getting errors:

    Permission Denied from the chmod command which makes sence so I committed them out and it worked. But here are my issues now.

    Now the thing would not delete the file out of the journal directory even those its chmod was 644. I also could not delete the username directory even though it was 777 so I had to delete the whole journal directory. Could that be becuase of the Owner and Group? Need any advice that is avaliable for information on how to make this script work correctly.

    Code Below


    $dir_grab = $DOCUMENT_ROOT.'/journal';
    $dir_create = $DOCUMENT_ROOT.'/journal/'.$username;

    $fh = fopen("$dir_grab/file.php","w+") or die("Cound not open 1");
    $content = fread($fh, filesize('file.php'));
    fclose($fh);

    //chmod($dir_grab, 0777);
    mkdir($dir_create, 0777);
    //chmod($dir_grab, 0755);

    $fh = fopen("$dir_create/index.php","w+") or die("Cound not open 2");
    fwrite($fh, $content);
    fclose($fh);

    //chmod("$dir_create/index.php", 0644);

  2. #2
    Join Date
    Jan 2003
    Location
    USA, FL
    Posts
    253
    thought has problem solve nevermind please post comments
    Last edited by Syphic; 03-23-2004 at 01:56 PM.

Posting Permissions

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