[Samba] windows acls
Peter Carlson
peter at howudodat.com
Wed Mar 29 13:49:37 UTC 2023
Rowland,
First my sincere appreciation for your help in resolving this issue.
Here is a summary of what I had to do to get it to work:
I should note that these files were once on a windows file server, then
moved over to a Synology NAS, then finally moved over to an ubuntu file
server. I'm sure along the way ACLs got all kinds of messed up.
Add share:
[Accounting2]
path = /data/Accounting2
comment = test
read only = no
mkdir Accounting2
chmod 0770 Accounting2/
chown root:"SDCP\\domain admins" Accounting2/
smbcontrol all reload-config
Go to windows (Computer Management) and set desired ACLs on the share
Copy the files
rsync -rltP CarePlacement-Accounting/* Accounting2/
Clear the existing ACLs on the files
chmod -R 0770 Accounting2/*
chown -R root:"SDCP\\domain admins" Accounting2/
setfacl -b -R Accounting2/*
Go to windows and push inherited ACLs on the copied files. This step
was needed because the files came over with all kinds of messed up
permissions and we cleared them in the previous step.
Remove old share and edit the share to change it's name
More information about the samba
mailing list