Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 288
  • 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

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

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