folder permissions problem with chdir()

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Andrew Crowe

    folder permissions problem with chdir()

    Hi guys,

    We're using the ISAPI version of PHP with IIS5.0

    On some websites for some reason any php file in the websites root is given
    the path winnt/system32 (getcwd() returns "C:\WINNT\syste m32"), while files
    in a folder are given the correct dir.

    To fix this I created a file that's included to all the files from php.ini


    if(getcwd()=="C :\WINNT\system3 2"){
    chdir($_SERVER["APPL_PHYSICAL_ PATH"]);
    }

    however this errors with

    "Warning: chdir(): No such file or directory (errno 2) in C:\php\define.p hp"
    (where $_SERVER["APPL_PHYSICAL_ PATH] return "D:\Websites\Si tename\www")

    www folder has read permissions for IUSR_WEBSERVER, Sitename has no IUSR
    permissions.

    If I allow IUSR List Folder Contents on Sitename folder then it works fine.


    Why does chdir require the parent folder to have this permission when the
    folder it's changing to has read & list permissions?


    Also does anyone know why some sites are given C:\WINNT\system 32 as a root
    while some work as expected? I asked a while back but got no reply.


    Thanks

    Andrew


Working...