Solved

Powershell files permission question

Posted on 2014-03-17
2
406 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 19

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

Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

New Windows 7 Installations take days for Windows-Updates to show up and install. This can easily be fixed. I have finally decided to write an article because this seems to get asked several times a day lately. This Article and the Links apply to…
Synchronize a new Active Directory domain with an existing Office 365 tenant
This tutorial will give a an overview on how to deploy remote agents in Backup Exec 2012 to new servers. Click on the Backup Exec button in the upper left corner. From here, are global settings for the application such as connecting to a remote Back…
This tutorial will show how to configure a new Backup Exec 2012 server and move an existing database to that server with the use of the BEUtility. Install Backup Exec 2012 on the new server and apply all of the latest hotfixes and service packs. The…

861 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