rsync errors

Matt McCutchen matt at
Wed Mar 26 12:51:10 GMT 2008

On Tue, 2008-03-25 at 23:21 +0530, Kaushal Shriyan wrote:
> How do i  set the "sms" user on hostaa to have permission to set
> permissions on
> /var/lib/mysql? 
> I have given  #setfacl -R -m u:sms:rwx /var/lib/mysql on hostaa
>                   #setfacl -R -m g:sms:rwx /var/lib/mysql on hostaa

The second command is unnecessary; granting access to the user "sms" is
enough.  But you also have to set the default ACL so that "sms" will
have permissions on new files created by "mysql".  To do this, run the
same command plus the -d option:

setfacl -R -dm u:sms:rwx /var/lib/mysql

You should also add user "mysql" to the access and default ACLs in the
same way so that it will have access to files created by "sms".
Finally, adding "rwx" entries to the access ACLs of existing files will
turn on their S_IXGRP permission bit.  To fix that bit, run:

chmod -R g-x,g+X /var/lib/mysql

At this point, the "failed to open" errors should go away.  Rsync may
still fail to set the times of /var/lib/mysql because it is owned by
user "mysql" and only the owner of a file is allowed to set its times
arbitrarily.  To get rid of that error, you can pass --omit-dir-times .


More information about the rsync mailing list