Network Share Permissions

G

Guest

I am working on a database imaging application. Links to the images are
stored in the database and accessed via a shared network drive. This network
share is mapped when the user logs on to Windows (using XP), and they have
“read†access only.

My challenge is I need the application to have “write†access during certain
functions, but I don’t want the user to have this access all the time. My
intent is for the app to impersonate a user with access to “write†to this
share during these times, and then switch back.

I have been able to successfully do the impersonation, (using
http://msdn.microsoft.com/library/d...ImpersonationContextClassTopic.asp?frame=true)
but am unable to “write†to the network share (get message that user does not
have permission)

My question – am I going about this correctly? Will the new identity
supersede the security in place when the drive is mapped during the initial
Windows log on? If not, is there another way I might accomplish the same
thing?

Thank you
 
D

David Browne

Shallotx said:
I am working on a database imaging application. Links to the images are
stored in the database and accessed via a shared network drive. This
network
share is mapped when the user logs on to Windows (using XP), and they have
"read" access only.

My challenge is I need the application to have "write" access during
certain
functions, but I don't want the user to have this access all the time. My
intent is for the app to impersonate a user with access to "write" to this
share during these times, and then switch back.

I have been able to successfully do the impersonation, (using
http://msdn.microsoft.com/library/d...ImpersonationContextClassTopic.asp?frame=true)
but am unable to "write" to the network share (get message that user does
not
have permission)

My question - am I going about this correctly? Will the new identity
supersede the security in place when the drive is mapped during the
initial
Windows log on?

No. You will have to disconnect from the network share and reconnect with
the new credentials.

http://support.microsoft.com/kb/106211/EN-US/


David
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top