COMPUTER BESTURINGSYSTEMEN 1

Shared Folders

Users moetten permissions hebben voor beidde lokale en de shared folders.

Gebruik hiervoor net share en icacls.


Net share

Gewone share

net share SHARENAME=DRIVE:PATH

Share met user permissions

net share SHARENAME=DRIVE:PATH [/grant:{user},{READ | CHANGE | FULL}]

Share met aangepaste hoeveelheid users

net share SHARENAME=DRIVE:PATH [/users:{users} | /unlimited]

Source: https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-r2-and-2012/hh750728(v=ws.11)


ICACLS

Geef permission aan een user of groep voor een specifieke map

icacls "{filename} | {PATH}" [/grant{:r} <user | group>:<permission>]

The perm option is a permission mask that can be specified in one of the following forms:

A sequence of simple rights (basic permissions):

PermissionDescription
FFull access
MModify access
RXRead and execute access
RRead-only access
WWrite-only access

A comma-separated list in parenthesis of specific rights (advanced permissions):

PermissionDescription
DDelete
RCRead control (read permissions)
WDACWrite DAC (change permissions)
WOWrite owner (take ownership)
SSynchronize
ASAccess system security
MAMaximum allowed
GRGeneric read
GWGeneric write
GEGeneric execute
GAGeneric all
RDRead data/list directory
WDWrite data/add file
ADAppend data/add subdirectory
REARead extended attributes
WEAWrite extended attributes
XExecute/traverse
DCDelete child
RARead attributes
WAWrite attributes

Inheritance rights may precede either perm form:

PermissionDescription
(I)Inherit. ACE inherited from the parent container.
(OI)Object inherit. Objects in this container will inherit this ACE. Applies only to directories.
(CI)Container inherit. Containers in this parent container will inherit this ACE. Applies only to directories.
(IO)Inherit only. ACE inherited from the parent container, but does not apply to the object itself. Applies only to directories.
(NP)Do not propagate inherit. ACE inherited by containers and objects from the parent container, but does not propagate to nested containers. Applies only to directories.

Source: https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/icacls