DO NOT REPLY [Bug 5520] Rsync cannot copy to a vfat partition on Linux kernel 2.6.25+

samba-bugs at samba.org samba-bugs at samba.org
Fri Aug 7 03:43:00 MDT 2009


https://bugzilla.samba.org/show_bug.cgi?id=5520


devzero at web.de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |devzero at web.de




------- Comment #3 from devzero at web.de  2009-08-07 04:42 CST -------
i`m getting

neoware:/tmp # mount -o loop vfat.dat /mnt/
neoware:/tmp # rsync -av log /mnt
sending incremental file list
log
rsync: chown "/mnt/.log.X0sasg" failed: Operation not permitted (1)

sent 859 bytes  received 31 bytes  1780.00 bytes/sec
total size is 773  speedup is 0.87
rsync error: some files/attrs were not transferred (see previous errors) (code
23) at main.c(1040) [sender=3.0.4]

which is 

[pid 23439] lstat64("log", {st_mode=S_IFREG|0755, st_size=773, ...}) = 0
[pid 23439] lchown32("log", 1000, 100)  = -1 EPERM (Operation not permitted)
[pid 23439] select(4, [3], [1], [1], {60, 0}) = 1 (out [1], left {60, 0})
[pid 23439] write(1, "<\0\0\10rsync: chown \"/mnt/log\" fail"..., 64) = 64
[pid 23439] time(NULL)                  = 1249636822
[pid 23439] time(NULL)                  = 1249636822
[pid 23439] select(4, [3], [1], [1], {60, 0}) = 1 (out [1], left {60, 0})
[pid 23439] write(1, "\4\0\0\7\2p\0\0", 8) = 8
[pid 23439] time(NULL)                  = 1249636822
[pid 23439] munmap(0xb7ae5000, 266240)  = 0
[pid 23439] munmap(0xb7b90000, 135168)  = 0
[pid 23439] select(4, [3], [], NULL, {60, 0} <unfinished ...>
[pid 23438] <... select resumed> )      = 1 (in [5], left {59, 992000})
[pid 23438] read(5, "<\0\0\10", 4)      = 4
[pid 23438] select(6, [5], [], NULL, {60, 0}) = 1 (in [5], left {60, 0})
[pid 23438] read(5, "rsync: chown \"/mnt/log\" failed: "..., 60) = 60
[pid 23438] write(2, "rsync: chown \"/mnt/log\" failed: "..., 59rsync: chown
"/mnt/log" failed: Operation
 not permitted (1)) = 59


i`m also wondering, why we get "EPERM". i would expect "EINVAL" here. 


Anyway - rsync tries to do chown on a filesystem where it`s not meant to do
that.

-p is invalid here, so is -a - but since -p is hidden in "-a" which is commonly
and widely used default - and the problem is, that this is not obvious to the
average end user.

does rsync have filesystem capabilities detection ? rdiff-backup handles such
things very intelligently, since it checks what features exist on the target
filesystem. 

anyway - what about adding a hint to chown/chmod related error messages?
if rsync does not intelligently handle that, at least the user should be given
a hint where to look at.

neoware:/tmp # rsync -av log /mnt
sending incremental file list
rsync: chown "/mnt/log" failed: Operation not permitted (1)
HINT: not all filesystems support attributs like owner or acl`s, so you may
accidentally transfer permission information where you shouldn`t. (options like
-p or -a)


-- 
Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.


More information about the rsync mailing list