Bug 972294
Summary: | lsetxattr/lgetxattr doesn't work to softlink file with ntfs FS in rhel7 | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | bfan |
Component: | libguestfs | Assignee: | Richard W.M. Jones <rjones> |
Status: | CLOSED WONTFIX | QA Contact: | Virtualization Bugs <virt-bugs> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 7.0 | CC: | leiwang, wshi |
Target Milestone: | rc | Keywords: | Regression |
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2014-04-25 09:22:58 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
bfan
2013-06-08 07:58:58 UTC
I'm fairly dubious that:
><fs> lsetxattr security.name "hello" 5 /link.txt
should work at all. Note *l*setxattr should set the attribute
on the symbolic link, not on the target file. But does it make
sense to set security.* attributes on the symbolic link? I
guess the answer depends on details of ntfs-3g or even of the
NTFS file format itself.
Using user.* attributes instead of security.* attributes (see https://bugzilla.redhat.com/show_bug.cgi?id=972292#c2) I get the following error: $ guestfish -N fs:ntfs -m /dev/sda1:/:user_xattr touch /test.txt : ln-s /test.txt /link.txt : lsetxattr user.name "hello" 5 /link.txt : lsetxattr user.type "ascii file" 10 /link.txt : lgetxattr /link.txt user.name : echo : lgetxattrs /link.txt libguestfs: error: lsetxattr: setxattr: Operation not permitted So it seems that ntfs-3g is not happy with us setting xattrs on symbolic links (although this is possible for ordinary Unix-like filesystems). Things work through the symlink if you use setxattr/getxattr instead: $ guestfish -N fs:ntfs -m /dev/sda1:/:user_xattr touch /test.txt : ln-s /test.txt /link.txt : setxattr user.name "hello" 5 /link.txt : setxattr user.type "ascii file" 10 /link.txt : getxattr /link.txt user.name : echo : getxattrs /link.txt hello [0] = { attrname: user.name attrval: hello } [1] = { attrname: user.type attrval: ascii file } I'm not sure what to conclude about this, except that NTFS is a strange not-Unix-like filesystem, and ntfs-3g works through FUSE so everything's complicated. Probably not something we need to worry about. |