Re: Fwd: glusterfs_1.4.0qa19: small issues

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 18 Jun 2008, Brent A Nelson wrote:

Any ideas on the two cp -a and rsync issues I reported earlier in this thread (cp -a fails to preserve directory permissions, both fail to preserve setuid bit)? Once those are out of the way, rsync and cp -a should be able to make perfect copies on a GlusterFS.


I believe I've narrowed down the setuid issue to a glitch in hardlink handling. It was happening in the case of /usr/bin/sudoedit apparently because sudoedit is a hardlink to sudo. When cp -a does the hardlink, it wipes out the setuid bit. I'm fairly certain this is what's happening, as I tried the cp -a with a bin directory that had sudo removed, and GlusterFS happily preserved the setuid bit. Try again with sudo present, it fails. Try again with sudo and sudoedit not being hardlinks, and it works!

Is anyone having any luck with "cp -a"'s inability to preserve directory permissions? In case it helps, here's an strace snippet from "cp -a blah /beast" where blah is an empty directory, mode 755, and /beast is my GlusterFS:

stat64("/beast", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat64("blah", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat64("/beast/blah", 0xbfca01ec) = -1 ENOENT (No such file or directory)
mkdir("/beast/blah", 0700)              = 0
lstat64("/beast/blah", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
open("blah", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|0x80000) = 3
fstat64(3, {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
fcntl64(3, F_GETFD)                     = 0x1 (flags FD_CLOEXEC)
getdents64(3, /* 2 entries */, 4096)    = 48
getdents64(3, /* 0 entries */, 4096)    = 0
close(3)                                = 0
futimesat(AT_FDCWD, "/beast/blah", {1214261897, 0}) = 0
lchown32("/beast/blah", 0, 0)           = 0
getxattr("blah", "system.posix_acl_access", 0xbfc9fe50, 132) = -1 EOPNOTSUPP (Operation not supported) setxattr("/beast/blah", "system.posix_acl_access", "\x02\x00\x00\x00\x01\x00\x07\x00\xff\xff\xff\xff\x04\x00\x05\x00\xff\xff\xff\xff \x00\x05\x00\xff\xff\xff\xff", 28, 0) = 0
removexattr("/beast/blah", "system.posix_acl_default") = 0
close(0)                                = 0
close(1)                                = 0
close(2)                                = 0
exit_group(0)                           = ?

The original directory was mode 755, while the copy is 700.

Thanks,

Brent




[Index of Archives]     [Gluster Users]     [Ceph Users]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux