Jump to content

Script to remove folder inhertiance and grant user read only access


Recommended Posts

Posted (edited)

I need to remove folder permission inheritance and grant a user read only access to the desktop folder to stop icons being deleted.

 

I've used the following commands but doesn't seem to work.

 

Any ideas as to why?

 

ICACLS C:\Users\USERID\Desktop\ /inhertitance:d

 

ICACLS C:\Users\USERID\Desktop\ /grant USERID: (OI)(CI)R

Edited by shane-meh
Posted
I need to remove folder permission inheritance and grant a user read only access to the desktop folder to stop icons being deleted.

 

I've used the following commands but doesn't seem to work.

 

Any ideas as to why?

 

ICACLS C:\Users\USERID\Desktop\ /inhertitance:d

 

ICACLS C:\Users\USERID\Desktop\ /grant USERID: (OI)(CI)R

 

You can do it pretty easily with Powershell and the NTFS Security module but an easier solution would be to just redirect the Desktop using GPOs to a central location and only have Read/Execute permissions on that folder. It would make managing the Desktop considerably easier and save you having to use a script such as this.

Posted
You can do it pretty easily with Powershell and the NTFS Security module but an easier solution would be to just redirect the Desktop using GPOs to a central location and only have Read/Execute permissions on that folder. It would make managing the Desktop considerably easier and save you having to use a script such as this.

 

Wouldn't work here. It's for a terminal which auto logs on, loads IE to Netscaler then users launch their ICA connection. We have a shortcut on the desktop that loads our netscaler login but sometimes this is accidentally deleted once the citrix session ends and someone minimises to the desktop. They don't actually use the desktop on the machine as this is just used as the back end for citrix.

 

I will check out the powershell options thanks.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...