• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 779
  • Last Modified:

Set rights on folders, subfolders and files by commandline

Hey

Example:

D:\Users\Jon\

I would like to give jon@mydomain.com access to the Jon folder (security) - Give him rights to add folder, subfolders and files to the D:\Users\Jon... But Jon should not be able to delete the Jon folder.

Using icacls? or?

Thanks in advance

Mike
0
mikeydk
Asked:
mikeydk
  • 3
1 Solution
 
btdownloads7Commented:
You should definitely use icacls. If you just run that command without any parameters, it will give you all the possible options and some examples. It will look something like this:
icacls d:\users\jon /grant jon:(RC,WDAC,WO,S,AS,MA,GR,GW,GE,GA,RD,WD,AD,REA,WEA,X,RA,WA)

icacls d:\users\jon /grant jon:(DE,DC)

Open in new window


The first command basically give him full access without delete permissions, and the second specifically denies those delete permissions
0
 
mikeydkAuthor Commented:
Hey

How do I set the "Only files and subfolders"? (not only "this folder")

Mike
0
 
btdownloads7Commented:
add the /T switch, which will propagate it into all the subfolders
0
 
btdownloads7Commented:
I just wanted to make sure that everything worked to your satisfaction
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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