Solved

Powershell files permission question

Posted on 2014-03-17
2
404 Views
Last Modified: 2014-03-17
Hi,

I'm trying to create a powershell script that creates and assigns various permissions to folders/shares.

I'm using the the 'system.security.accesscontrol.filesystemaccessrule' command to assign permissions but I'm unable to find the value for the 'Create folder/append data' permission.

can anyone let me know what value i should use here ***** i can't find a list of potentional values anywhere but I'm probally looking in the wrong place

$Ar = New-Object  system.security.accesscontrol.filesystemaccessrule("Authenticated Users","***************","ObjectInherit", "None", "Allow")
$Acl.SetAccessRule($Ar)

thanks
0
Comment
Question by:Z1ggy
2 Comments
 
LVL 18

Accepted Solution

by:
Raheman M. Abdul earned 500 total points
ID: 39933950
User AppendData  in your case in place of ***********

Try this to give Create Folder / Append Data permission to the folder c:\testFolder
\-------------------
$folder = "c:\testFoler"
$myGroup = "albg\stftuser"
$acl = Get-Acl $folder

$rule = New-Object System.Security.AccessControl.FileSystemAccessRule("$myGroup", "AppendData", "ContainerInherit, ObjectInherit", "None", "Allow")

$acl.AddAccessRule($rule)
Set-Acl $folder $acl
0
 

Author Closing Comment

by:Z1ggy
ID: 39934323
:) thanks thats exactly what i was looking for !
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This script can help you clean up your user profile database by comparing profiles to Active Directory users in a particular OU, and removing the profiles that don't match.
This article explains how to install and use the NTBackup utility that comes with Windows Server.
This tutorial will show how to push an installation of Backup Exec to an additional server in both 2012 and 2014 versions of the software. Click on the Backup Exec button in the upper left corner. From here, select Installation and Licensing, then I…
This tutorial will show how to configure a single USB drive with a separate folder for each day of the week. This will allow each of the backups to be kept separate preventing the previous day’s backup from being overwritten. The USB drive must be s…

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question