bug-coreutils
[Top][All Lists]
Advanced

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

bug#16131: copy extended attributes of a symbolic link


From: A. Wan
Subject: bug#16131: copy extended attributes of a symbolic link
Date: Fri, 13 Dec 2013 08:43:36 -0800
User-agent: SquirrelMail/1.4.22

I wonder if this is a bug or I just did it the wrong way.  I can't seem to
copy extended attributes of symbolic links.  Example is to populate the
upperdir of an overlayfs in Linux.

coreutils 8.21
libattr 2.4.47

I can only use mv to preserve extended attributes of symbolic links,
and only when the destination is in the same filesystem.  (It looks like
mv summons copy when destination is in a different filesystem)

Steps to reproduce:  (The same happens in either ext2 or tmpfs)

--- cut here ---
touch a
ln -sv '(overlay-whiteout)' b

| ‘b’ -> ‘(overlay-whiteout)’

setfattr -hn trusted.overlay.whiteout -v y a
setfattr -hn trusted.overlay.whiteout -v y b
getfattr -hn trusted.overlay.whiteout a

| # file: a
| trusted.overlay.whiteout="y"

getfattr -hn trusted.overlay.whiteout b

| # file: b
| trusted.overlay.whiteout="y"

cp -vaP a c

| ‘a’ -> ‘c’

cp -vaP b d

| ‘b’ -> ‘d’

getfattr -hn trusted.overlay.whiteout c

| # file: c
| trusted.overlay.whiteout="y"

getfattr -hn trusted.overlay.whiteout d

| d: trusted.overlay.whiteout: No such attribute

--- cut here ---






reply via email to

[Prev in Thread] Current Thread [Next in Thread]