get folder share permissions  
Author Message
schewardnadse





PostPosted: Visual C# General, get folder share permissions Top

Hi,

I have a path and a userID - how can I find out if the file (path) is shared with the user (userIdentity)

In other words, how can I get information about the share permissions of a specific folder

Thanks,

Ralph



Visual C#2  
 
 
Sergio.Rykov





PostPosted: Visual C# General, get folder share permissions Top

Look NetShareEnum, NetShareGetInfo

http://pinvoke.net/default.aspx/netapi32.NetShareGetInfo


 
 
schewardnadse





PostPosted: Visual C# General, get folder share permissions Top

Hi,

I have a path and a userID - how can I find out if the file (path) is shared with the user (userIdentity)

In other words, how can I get information about the share permissions of a specific folder

Thanks,

Ralph


 
 
schewardnadse





PostPosted: Visual C# General, get folder share permissions Top

Thanks Sergio,

let me specify the problem: I need nothing else, than the user and group names (e.g. everyone)  listed in the "share permission" panel of the folder properties of a specific folder.

Is there no C# method (similar to the method which returns the file access rules of a folder)

 

 


 
 
Figo Fei - MSFT





PostPosted: Visual C# General, get folder share permissions Top

Hi,

Sorry, I havent got a clud to implement it with pure C#, and it seems to use NetShareGetInfo Win32 API with PSHARE_INFO_502 structure to obtain the Security Descriptor information.

Here is the reference: http://msdn2.microsoft.com/en-us/library/aa380482.aspx

Thank you



 
 
Figo Fei - MSFT





PostPosted: Visual C# General, get folder share permissions Top

Hi, schewardnadse

You don’t need to post the same issue again. We will focus on one thread. I've merged them.

Thank you for understanding.