https://bugzilla.samba.org/show_bug.cgi?id=8844
Summary: rsyncd ownership handling
Product: rsync
Version: 3.1.0
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P5
Component: core
AssignedTo: wayned at samba.org
ReportedBy: andras.porjesz at ericsson.com
QAContact: rsync-qa at samba.org
I have an rsync client running with the following flags:
RSYNC_FLAGS="--recursive" # this tells rsync
to copy
directories recursively
RSYNC_FLAGS="$RSYNC_FLAGS --links" # recreate symlinks
RSYNC_FLAGS="$RSYNC_FLAGS --perms" # set the
destination
permissions
RSYNC_FLAGS="$RSYNC_FLAGS --times" # transfer
modification
times along with the files
RSYNC_FLAGS="$RSYNC_FLAGS --omit-dir-times" # omit directories
when it
is preserving modification times
RSYNC_FLAGS="$RSYNC_FLAGS --owner" # set the owner of
the
destination file to be the same as the source
# group is set to ossdes on the server side, so
there is no option for that here
RSYNC_FLAGS="$RSYNC_FLAGS --chmod=Dg+rw,Fg+r" # set permissions
# RSYNC_FLAGS="$RSYNC_FLAGS -D" # option is equivalent
to
--devices --specials - we do not need it
RSYNC_FLAGS="$RSYNC_FLAGS --compress" # compress file
data during
the transfer
RSYNC_FLAGS="$RSYNC_FLAGS --relative" # use relative
paths
RSYNC_FLAGS="$RSYNC_FLAGS --numeric-ids" # transfer numeric
group and
user IDs
RSYNC_FLAGS="$RSYNC_FLAGS --delete" # delete extraneous
files
from the receiving side
RSYNC_FLAGS="$RSYNC_FLAGS --stats" # print a verbose
set of
statistics on the file transfer
RSYNC_FLAGS="$RSYNC_FLAGS --human-readable -h" # output
numbers in a
human-readable format
I have an rsyncd (root:root) with the following setup:
comment = data area for rsync
path = something
log file = /var/log/rsyncd.log
uid=root
gid=mygid
read only=false
write only=false
use chroot=true
rsync works as expected (at least does what I expect). when I comment out
uid=root in rsyncd.conf the owner will not be transferred any more, it will
remain nobody.
The precedence of --perms on the client side (including -o, -g) and the uidguid=
settings on the server side are unclear, not documented and as I wrote
here depending on the settings rsync may even change its behavior.
--
Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
https://bugzilla.samba.org/show_bug.cgi?id=8844
Wayne Davison <wayned at samba.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |INVALID
--- Comment #1 from Wayne Davison <wayned at samba.org> 2012-08-12
17:18:51 UTC ---
Taken from the rsyncd.conf manpage:
uid
This parameter specifies the user name or user ID that file transfers to
and from that module should take place as when the daemon was run as root.
That is stated poorly in that it is trying to say that the process runs as that
user. The gid parameter is similar. Both default to running the process as
"nobody", which has no rights to chown files to other users. So, if
you want
to preserve ownership, you must run the receiving process as root, or perhaps
settle for fake-super storing ownership info as xattrs (which will only be
useful for people reading the files via rsync).
--
Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
Wayne,
This is the bug:
That is stated poorly. And it is not invalid at all.
-----Original Message-----
From: rsync-bounces at lists.samba.org [mailto:rsync-bounces at lists.samba.org]
On Behalf Of samba-bugs at samba.org
Sent: Sunday, August 12, 2012 19:19
To: rsync-qa at samba.org
Subject: [Bug 8844] rsyncd ownership handling
https://bugzilla.samba.org/show_bug.cgi?id=8844
Wayne Davison <wayned at samba.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |INVALID
--- Comment #1 from Wayne Davison <wayned at samba.org> 2012-08-12
17:18:51 UTC --- Taken from the rsyncd.conf manpage:
uid
This parameter specifies the user name or user ID that file transfers to and
from that module should take place as when the daemon was run as root.
That is stated poorly in that it is trying to say that the process runs as that
user. The gid parameter is similar. Both default to running the process as
"nobody", which has no rights to chown files to other users. So, if
you want to preserve ownership, you must run the receiving process as root, or
perhaps settle for fake-super storing ownership info as xattrs (which will only
be useful for people reading the files via rsync).
--
Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email
------- You are receiving this mail because: ------- You are the QA contact for
the bug.
--
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Possibly Parallel Threads
- Question about file ownership on destination
- [Bug 11013] New: [patch] Mention that privileges are dropped, when "use chroot" is enabled in rsyncd.conf manpage
- [Bug 8655] New: link-by-hash: add 'link by hash dir' to rsyncd.conf
- [Bug 8336] New: parent dir permission
- [Bug 10031] New: rsyncd resolves hosts stupidly