Click here to Skip to main content
15,906,094 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all,

I am accessing a shared folder from another server
and need to first change the permission of that shared folder.

How would I be able to do this easily?

Please any help would be appreciated?
Posted

hi Ben,
you can use impersination in you code
follow the below link

A Complete Impersonation Demo in C#.NET[^]
 
Share this answer
 
If the account your code is running under doesn't already have Full Control permissions to the share, you can't do it. You cannot grant yourself more permissions than you already have.
 
Share this answer
 
Hi, look at this question (see below). It's similar with yours and exposes some impersonation capabilities of NET and WinApi.

Read/Write text file on shared pc[^]
 
Share this answer
 
Hi Ben,

Can you just tell which is your O.S ?
 
Share this answer
 
Comments
Ben Paxton 30-May-12 10:33am    
Windows Server 2008
Linto Leo Tom 30-May-12 10:54am    
Right click the folder u want to share.
Click on properties.
Click the tab sharing.
click button share.
Select the user from the list.(if u select everyone, then it will be public)
Click Button Add.
Now chnage the level dropdown value to Read/Write.
Click Share.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900