[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 289
  • Last Modified:

Windows 2008 - script to turn on "Deny" for specific file permissions in Security?

How to turn on by command line "Deny" box for specific file Security section?
File has inherited permission from the directory before.

Please provide command line example.

See explanations below
Inherited permissions
0
longjumps
Asked:
longjumps
  • 2
1 Solution
 
ednetmanCommented:
This needs to be run from an elevated command prompt.

ICACLS FileName /deny User:Permission NP

If the file is called test.txt
You want to DENY the Modify permission to EVERYONE and do not want it to propagate inherit


ICACLS test.txt /deny Everyone:Modify NP

Add /Q  for Quiet....


ICACLS test.txt /deny Everyone:Modify NP /Q

Full explanations here: http://ss64.com/nt/icacls.html
0
 
longjumpsAuthor Commented:
Which command should be for file to perform - don't inherit  from parent and copy all access to current file from parent?
0
 
longjumpsAuthor Commented:
ICACLS filename /inheritance:d
0

Featured Post

[Webinar] Improve your customer journey

A positive customer journey is important in attracting and retaining business. To improve this experience, you can use Google Maps APIs to increase checkout conversions, boost user engagement, and optimize order fulfillment. Learn how in this webinar presented by Dito.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now