SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Enthusiast
    Join Date
    Dec 2008
    Location
    Idaho
    Posts
    34
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    rename() permission issue

    So im trying to rename a directory on my server as part of a script here is the code:
    Code:
    $oldfilepath = '../' . $NAME . '/';
    $newfilepath = '../' . $newname . '/';
    
    rename($oldfilepath,$newfilepath);
    name is just the name of the file, no slashes inside it or anything... it says permission is denied when i run the script... the file was created with 0777 permissions, but that doesnt seem to do anything. Am I using incorrect file paths? Any help would be great. BTW Im running the script on xampp server on my windows comp if that affects anything... thanks for any help!

  2. #2
    SitePoint Wizard bronze trophy
    Join Date
    Jul 2008
    Posts
    5,757
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What is the actual error message?

    The directory this dir lives in needs to be writable.

  3. #3
    SitePoint Enthusiast
    Join Date
    Dec 2008
    Location
    Idaho
    Posts
    34
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    SOrry i can post the warning (spam filter wont let me), it just says Warning Permission denied in client_edit php

    and how would I chmod() the current directory? thank you, sorry i cant try it myself i can't get to my code right now... thanks for the help

  4. #4
    SitePoint Enthusiast
    Join Date
    Dec 2008
    Location
    Idaho
    Posts
    34
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well I checked the parent directory and it is writable, its perms are st to 777. So im trying to rename (businessletters 25) to a new name from (businessletters 25 cpanel script php) all files are writable and have 777 perms. I don't know what is going on.

    just imagine slashes where spaces are where i put file paths, can't post real filepaths due to filter again.


Bookmarks

Posting Permissions

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