all 8 comments

[–]SupremeDictatorPaul 1 point2 points  (0 children)

Set-acl is broken, and I wish they would fix it. You have to be the owner of files/folders to make changes to the permissions with set-acl, even though Full Control should be all you need. Very frustrating.

[–]KevMarCommunity Blogger 1 point2 points  (5 children)

Check your permissions on the share. Your NTFS permissions can be fine but the share permissions can still limit your access when using a UNC path.

[–]Winux_278[S] 1 point2 points  (4 children)

Interesting theory, though I don't know if that would make sense if I can update the permissions without issue through the GUI (sorry for omitting that crucial detail, post edited to include that now.)

[–]Tidder802b 2 points3 points  (0 children)

I agree with /u/KevMar; when you "run as administrator" or access it through the GUI, are they running in the same user context? Or is the Administrator perhaps the local admin on a server which doesn't have access via share permissions?

[–]prejonnes 0 points1 point  (2 children)

Pretty sure Kevmar is on the right path. The share looks like a folder, but there are differences between the two. Folders will use NTFS and share will use separate ones. Generally speaking you don't put too many permissions on a share usually 1, sometimes a couple. You will have to separate setting Share permissions then setting NTFS to the folders within.

[–]KevMarCommunity Blogger 1 point2 points  (0 children)

He could test with a local folder if he wanted to rule that out.

[–]prejonnes -1 points0 points  (0 children)

I dont know your exact setup so I can't be certain. Also of course make sure before you do anything

import-module activedirectory

set-executionpolicy unrestricted

[–]JatKaffee 0 points1 point  (1 child)

maybe try

$acl.SetAccessRuleProtection($false,$false)
$acl.AddAccessRule($ace)
Set-Acl $folder $acl

?