[Samba] Best practice to import folders to Samba?
L.P.H. van Belle
belle at bazuin.nl
Thu Jun 3 11:14:53 UTC 2021
You can copy everything to the new locations and then remove all old acls.
echo "Removing old ACL's"
setfacl --recursive --remove-all /srv/samba/datashare
echo "Recursively removing access to : other (guests)"
chmod -R o-rwx /srv/samba/datashare
echo "Re-apply root:root on /srv/samba/datashare"
chown -R root:root /srv/samba/datashare
! Root:root is use, so only the Administrator can create new folders and set rights from this point.
At this point all subfolders are clear and ready for the new acl's.
> -----Oorspronkelijk bericht-----
> Van: samba [mailto:samba-bounces at lists.samba.org] Namens
> Anders Östling via samba
> Verzonden: donderdag 3 juni 2021 12:57
> Aan: sambalist
> Onderwerp: [Samba] Best practice to import folders to Samba?
> I am testing to setup a new lab domain, and so far all is good. 2 DC's
> and 2 file servers are now in the domain, along with 2 windows 10
> clients. Everything works as planned.
> Now I would like to import a large set of data files from another
> production domain. I have copied some folders into the new lab
> domain's fileserver, but permissions and ownership of files are wrong.
> The files have retained their old GID's that does not exist in the lab
> So, I am looking for a method to strip off all ACL's and other
> permission related data. either before or after the import (whichever
> is easiest).
> Once the files and folders are "clean", I would like to put them into
> a number of prepared shares where they should inherit permissions,
> ownership etc from the shared folder.
> I have of course checked the wiki and about 99% of Internet, but cant
> find any good and recent guide. Anyone here that have some advice?
> Best regards!
> ------ -------------------- 8 ------------------ ------
> "A wise man once told me - Any idiot can do backups, but it takes a
> genius to successfully restore"
> Anders Östling
> +46 768 716 165 (Mobil)
> +46 431 45 56 01 (Hem)
> To unsubscribe from this list go to the following URL and read the
> instructions: https://lists.samba.org/mailman/options/samba
More information about the samba