Problem with user impersonation and access rights
From: Frank C. (frankc_at_hotmail.com)
Date: 08/04/03
- Next message: Frank C.: "Problem with user impersonation and access rights"
- Previous message: Tim: "ADMNLOCK"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Sun, 3 Aug 2003 21:52:54 -0300
I want to copy files from a given directory 'A', for instance, to 'B'.
Lets consider two users: FIRST, the user that runs the application and have
rights to access the directory 'A' but have full rights on 'B' and SECOND
that have rights to access the directory 'B' but have full rights on 'A'
(the opposite).
Without impersonation, I cannot copy from A to B because the user FIRST
doesn't have permission to access A.
If I use LogonUser and ImpersonateLoggedOnUser to impersonate the user
SECOND, but I cannot copy because SECOND doesn have permission to access B.
Well, I could impersonate SECOND, then copy the files to a temporary
directory where both users can access, the revert and copy to B.
But I am wondering if is there a more intelligent way, by merging the rights
of FIRST and SECOND and copying the files directly in one pass.
Any idea?
- Next message: Frank C.: "Problem with user impersonation and access rights"
- Previous message: Tim: "ADMNLOCK"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|