[Message Deleted]
-
If i set individual permission instead of FullControl than it possible to enable by .Allow option ?
Hitesh sojitra
I guess try it and see.
Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
-
I guess try it and see.
Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
i tried but not a single permission could be enabled by .Allow Option
Hitesh sojitra
-
i tried but not a single permission could be enabled by .Allow Option
Hitesh sojitra
You're OBVIOUSLY going to have to use an admin account to grant the permissions back to that user. Then you can go back as that user and try your code again. Please tell me you know how permissions and Windows Security works before you attempt to write code that manipulates it?? BTW: What you're doing is a complete waste of time. You're really not proecting anything by allowing the user to manipulate access rights. There is absolutely nothing stopping the user from resetting the permissions directly on these files/folders from Explorer. Please keep in mind that any code a user launches runs AS the user. There is no special permissions that code gets over and above the permissions the user has who launched it.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008 -
You're OBVIOUSLY going to have to use an admin account to grant the permissions back to that user. Then you can go back as that user and try your code again. Please tell me you know how permissions and Windows Security works before you attempt to write code that manipulates it?? BTW: What you're doing is a complete waste of time. You're really not proecting anything by allowing the user to manipulate access rights. There is absolutely nothing stopping the user from resetting the permissions directly on these files/folders from Explorer. Please keep in mind that any code a user launches runs AS the user. There is no special permissions that code gets over and above the permissions the user has who launched it.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008[Message Deleted]
-
[Message Deleted]
first i m using this code to Deny permission dSecurity.AddAccessRule(New Security.AccessControl.FileSystemAccessRule("cybergindia\hitesh", FileSystemRights.Write, AccessControlType.Deny)) AND To enable it i Use this code dSecurity.AddAccessRule(New Security.AccessControl.FileSystemAccessRule("cybergindia\hitesh", FileSystemRights.Write, AccessControlType.Allow)) is it right way ?
Hitesh sojitra
-
[Message Deleted]
hitesh sojitra wrote:
but i don't know in much detail how windows security works ? he
Sorry, this is a topic that is so large, it's covered by entire books. A few forum posts is not going to cover it. Click[^]
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008 -
first i m using this code to Deny permission dSecurity.AddAccessRule(New Security.AccessControl.FileSystemAccessRule("cybergindia\hitesh", FileSystemRights.Write, AccessControlType.Deny)) AND To enable it i Use this code dSecurity.AddAccessRule(New Security.AccessControl.FileSystemAccessRule("cybergindia\hitesh", FileSystemRights.Write, AccessControlType.Allow)) is it right way ?
Hitesh sojitra
ok So sir just you guide me how to enable individual permission of folder/file
Hitesh sojitra
-
ok So sir just you guide me how to enable individual permission of folder/file
Hitesh sojitra
You're already doing it the correct way. It's your lack of understanding about how permissions work that's going against you.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008 -
Thanks it works... :) Is there any API for retriving domainname/user. :)
Hitesh sojitra
Hi Hitesh, It is good to hear that my response was helpful. Well, I am not aware of any such API's however, you may try to explore the System.Security namespace for more feature and functionality. Hope this helps.
Regards, John Adams ComponentOne LLC
-
You're already doing it the correct way. It's your lack of understanding about how permissions work that's going against you.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008ok Thank for help will try and let u know again ......
Hitesh sojitra