Re: SetCurrentDirectory question

From: Alexander Nickolov (agnickolov_at_mvps.org)
Date: 09/07/04

  • Next message: Phil H: "PPP from Windows to Embedded hardware?"
    Date: Tue, 7 Sep 2004 12:53:16 -0700
    
    

    Don't you get ERROR_ACCESS_DENIED after FindFirstFile
    fails?

    I suppose the network redirector does not check the permissions
    on the underlying directory when you set the current directory,
    it only checks the permissions on the network share, that's why
    your SetCurrentDirectory call succeeds.

    -- 
    =====================================
    Alexander Nickolov
    Microsoft MVP [VC], MCSD
    email: agnickolov@mvps.org
    MVP VC FAQ: http://www.mvps.org/vcfaq
    =====================================
    "NMD" <NMD@discussions.microsoft.com> wrote in message 
    news:92A0B614-07D4-40B3-8701-836D856DB2F8@microsoft.com...
    > This may be a stupid question, but I will ask it anyway, as I can't find
    > anyone on the web who has ran into the same problem.
    >
    > If for instance, I am on a machine that has a particular directory(\foo 
    > for
    > instance) secured, i.e. I do not have permissions to look inside, if I
    > execute the SetCurrentDirectory call to set the current directory to this
    > directory, I get a failure(5), as expected.
    >
    > However, if I am on a remote machine that can access this system, if I 
    > issue
    > the SetCurrentDirectory call using the share path, i.e. 
    > \\remote_server\foo,
    > I do not get an error.  It does appear that I am being blocked, as this
    > particular piece of code is unable to list any files in this directory,
    > however, the SetCurrentDirectory call does not fail, as it did when ran on
    > the actual machine.
    >
    > This makes it difficult for us to determine if the failure to find files 
    > was
    > due to the fact that the directory is empty, or we do not have the right
    > permissions set up.
    >
    > Any ideas?
    >
    > Thanks,
    > NMD 
    

  • Next message: Phil H: "PPP from Windows to Embedded hardware?"

    Relevant Pages

    • Re: VB CGI program: oExcel.Workbooks.Open Locks IIS
      ... don't need an EXE to run VB on IIS. ... Setting Everyone as permissions is *irrelevant* in this situation, ... when I open an xls file WITHOUT a macro, ... >> sheet) it's fine, but with the macro, opening fails. ...
      (microsoft.public.inetserver.iis.security)
    • Re: loadLibrary fails in linux
      ... Now i want to do the same in linux using this code but fails: ... can change the system property java.library.path, but does it actually have any ... to all directories on the path, not just the permissions on file in question. ... You need execute permission on each directory and read on the file. ...
      (comp.lang.java.programmer)
    • Re: remote desktop disconnect immediatly
      ... Ensure that it points at the correct drivefor the pagefile. ... If the user logging on does not have proper NTFS permissions to their ... user profile, 'All Users Profile', or system files this behavior may occur. ... Re-apply the system default permissions if step 4 fails. ...
      (microsoft.public.windows.server.networking)
    • Re: KB905474 failing.... again?
      ... now back Validation tool KB905474 fails to install just like KB892130 ... A potential fix has been posted previously in this newsgroup. ... These permissions can be repaired using Registry Editor as follows: ...
      (microsoft.public.windowsupdate)