Solved

Powershell files permission question

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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Restoring deleted objects in Active Directory has been a standard feature in Active Directory for many years, yet some admins may not know what is available.
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
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 walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles to another domain controller. Log onto the new domain controller with a user account t…

760 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now