[Samba] sysvol permission errors on newly joined DC
Rowland Penny
rpenny at samba.org
Mon Mar 21 10:04:25 UTC 2022
On Mon, 2022-03-21 at 09:53 +0000, Carlos Gardel via samba wrote:
> Hello Rowland and Louis,
>
> Thank you so much for your help!
>
> I think we have found the problem (and hopefully soon the solution).
>
> Regarding the sysvol sync process I set everything up according to
> the tutorial at:
> https://wiki.samba.org/index.php/Rsync_based_SysVol_replication_workaround
>
> Therefore I have the following in crontab (on DC3):
>
> # Rsync Sysvol folder from DC1 to local
> */5 * * * * rsync -XAavz --delete-after --password-
> file=/usr/local/samba/etc/rsync-sysvol.secret rsync://sysvol-
> replication at 192.168.xxx.xxx/SysVol/ /usr/local/samba/var/locks/sysvol
>
> As you can see the rsync options are correctly set to: -XAavz.
>
> What I have discovered now is that if I run the above crontab rsync
> command manually (as root) the extended attributes are synced.
>
> This is the permissions on the
> /usr/local/samba/var/locks/sysvol/example.samdom.com folder after the
> manual rsync:
>
> [root at dc3 sysvol]# ls -al
> total 8
> drwxrwx---+ 3 root 3000000 38 Feb 4 2015 .
> drwxr-xr-x 4 root root 141 Mar 18 14:43 ..
> drwxrwx---+ 4 root 3000000 37 Feb 4 2015 example.samdom.com
>
> I.e. the extended attributes are there.
>
> But if I wait for the scheduled crontab entry to run (every 5
> minutes) the permissions are reverted to:
>
> [root at dc3 sysvol]# ls -al
> total 8
> drwxrwx--- 3 root 3000000 38 Feb 4 2015 .
> drwxr-xr-x 4 root root 141 Mar 18 14:43 ..
> drwxrwx--- 4 root 3000000 37 Feb 4 2015 example.samdom.com
>
> I.e. the extended attributes are gone.
>
> I don’t understand why this is happening since it is the exact same
> rsync command that is run? Do you have any thoughts on this?
Is your crontab a root crontab ? It needs to be.
Rowland
More information about the samba
mailing list