22
votes
Copy security permissions of one file to another
The easiest way, by far, is to use PowerShell and run:
Get-Acl .\file1 | Set-Acl .\file2
18
votes
Reset default ACLs for C:\Program Files\WindowsApps
UPDATE: based on the comments, don't use this command anymore. Use the
voted answer or the tool provided by: Agentrev ->
https://github.com/AgentRev/WindowsAppsUnfukker
(Btw, never hat a Problem ...
17
votes
How do I remove permission to specific user using setfacl
The following should do the trick :
setfacl -x u:userXXX home/userYYY/private/
And as far as I know, where ACL are enabled, a + sign is shown.
16
votes
Accepted
Remove ACLs in Linux permissions
You should also have found this setfacl option:
-b, --remove-all remove all extended ACL entries
So in order to remove ACLs just run setfacl -b -R on the directory, and chmod g=rwx afterwards....
10
votes
How to change file permissions on Windows via powershell / cmd?
The permission system on Windows is called ACL. To edit the ACL list use
cacls on Windows prior to Vista
For example to add Read-Only permission to myfile.txt
CACLS myfile.txt /E /G "Power Users":R
...
9
votes
Reset default ACLs for C:\Program Files\WindowsApps
Like this to reset permission on this folder:
icacls "C:\Program Files\*" /q /c /t /reset
The things was:
/reset - Replaces ACLs with default inherited ACLs for all matching files.
/t - ...
9
votes
Reset default ACLs for C:\Program Files\WindowsApps
I found this answer when searching Google, and it led me to a solution.
ISSUE: Windows apps (such as Mail and Calendar) will not open. Start Menu will not open. Can't right-click taskbar icons.
...
8
votes
Accepted
Meaning of starting d and starting l in drwxr-xr-x and lrwxr-xr-x
The d stands for directory. The l stands for symbolic link.
The first character in the permissions string has nothing to do with permissions. It simply identifies what kind of object it is.
8
votes
Setting differing ACLs on directories and files
For future readers, to use setfacl on existing files/folders without adding the executable bit to your files, the solution is this part of @Mikel's answer:
My version of setfacl allows X exactly ...
7
votes
Accepted
Reset default ACLs for C:\Program Files\WindowsApps
I struggled with this issues A LOT.
First of all DO NOT USE
icacls "C:\Program Files\WindowsApps" /reset /t /c /q.
It will remove special conditional permissions from folder and give it ...
6
votes
Give write permissions to multiple users on a folder in Ubuntu
Following script shows an example to give r (read) / w (write) / x (execute) permission to the given folder path /path/to/the/directory for USER1 and USER2. If you want to give only write access ...
6
votes
Reset default ACLs for C:\Program Files\WindowsApps
I did not have to use the recovery disk option mentioned previously. I just had to run it from the command prompt in administrator mode:
icacls "C:\Program Files\WindowsApps" /reset /t /c /q
...
5
votes
Give write permissions to multiple users on a folder in Ubuntu
Opinionated anwer:
I like to put my shared folder in a central place. Not in someone else's homefolder, but /srv/common or even (for ruthlessly short paths...) /repo or similar.
define a new group (...
4
votes
Accepted
Is it possible to add more than one AWS ACL to a subnet?
You cannot attach multiple ACLs to a single subnet. If you create an ACL and attach it to the subnet it will override the existing ACL.
You can request AWS Support to increase Rules per ACL limit up ...
4
votes
Does Windows copy file permissions with copied files?
If you're making a new copy, it inherits the destination folder's ACLs. There is a hidden Explorer setting, ForceCopyAclwithFile, that would tell it to copy the ACLs as well.
How permissions are ...
3
votes
Accepted
Is there a way to use ACL to have multiple groups owning one folder?
Yes, you can have entries for multiple groups in an ACL – that's actually the whole point of the ACL feature.
(Except you don't need to have the groups "own" the folder in any way. Aside from disk ...
3
votes
Inbound/Outbound ACLs?
If we're talking about a cisco router,
acl inbound at an interface would mean 'let the acl process the packets coming into the router through that interface' i:e; while packets enter the router ...
3
votes
How do I set default (not inherit) acl permissions on file creation?
There is no "default ACL" in NFSv4 ACLs. However, you have a precise control over what is inherited and by what. In particular, you can add ACEs to be inherited by files, and another set that can be ...
3
votes
Why is current CPU frequency read-only for root?
You should be able to read
scaling_cur_freq
To answer the question:
It seems that reading
cpuinfo_cur_freq
communicates directly with the hardware or - depending on implementation - the firmware ...
3
votes
Change registry permissions via command line (batch file)
You can also use Subinacl.exe (Official tool from Microsoft for managing permissions).
To change users permissions for a special registery key and its subkeys you can write sommething like this (copy ...
3
votes
How to copy Time Machine volume to another disk using rsync while preserving ACLs?
Apple currently says to use the Finder to copy Time Machine backups.
https://support.apple.com/en-gb/HT202380
My experience, in trying to copy 1TB TimeMachine backup from local disc to network disk, ...
3
votes
How do I remove permission to specific user using setfacl
yes
use command like this:
setfacl -m user:userXXX:-r /home/userYYY/private/
or remove user at all
setfacl -x user:userXXX /home/userYYY/private/
3
votes
Accepted
Change printer group permission with script?
Please see the below resources and quoted steps for detail on setting printer permissions via command line in Windows (both PowerShell and Batch).
Batch modify printer permissions
If you want ...
3
votes
Accepted
Directory with ACL - permission denied
I'm in Arch Linux but it should be more or less the same command.
USING ACL:
sudo setfacl -R -d -m o::rwx /path/.bashrc
sudo setfacl -R -m o::rwx /path/.bashrc
Of course that's an uncesserilly ...
3
votes
Best way to copy user files from NTFS drive pulled from another system?
You can boot your PC off a Linux live CD/DVD/USB and then copy the files to a new drive. Linux will ignore the NTFS permissions and security. Boot once, copy an entire drive, remove the USB drive ...
3
votes
Accepted
Why does my ACL need to be configured this way to grant access that I want?
online reading suggested I needed an ACL for return messages), so I added a version of rule 3 that referenced the VNC service, and that still failed. On a whim I tried creating the VNC_duplex service ...
2
votes
How do I remove any SELinux context or ACL?
As long as selinux is in permissive or enforcing you will not be able to remove the .
This indicates selinux attributes are set. Since Permissive is still doing the selinux checks (just not enforcing) ...
2
votes
How to make an exact copy of a directory to an another partition?
Use ln from Hermann Schinagl you can find it here. Free for personal use and some work use, check the licence. It does everything you need and is a Windows command line tool.
2
votes
Accepted
How to add a SID to a folder permissions
How to add a SID to a folder permissions
How to add a specific SID to a folder's permission like the image and
give it read permission.
You can do this with ICACLS from Windows command prompt, but be ...
2
votes
Accepted
Use /sys/class/gpio/ in Python without root permissions
This was answered here.
Essentially, edit the file /etc/udev/rules.d/99-com.rules and append:
SUBSYSTEM=="gpio*", PROGRAM="/bin/sh -c 'chown -R root:gpio /sys/class/gpio && chmod -R 770 /...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
acl × 280permissions × 115
linux × 86
windows × 57
file-permissions × 55
ntfs × 33
windows-7 × 25
networking × 13
macos × 13
powershell × 13
windows-10 × 11
security × 11
filesystems × 9
ubuntu × 8
unix × 8
samba × 8
icacls × 8
windows-registry × 7
rsync × 7
freebsd × 7
nfs × 7
chmod × 7
user-accounts × 6
windows-8 × 5
firewall × 5