admin 管理员组文章数量: 1086019
linux下setfattr命令出错:setfattr: file0: Operation not supported
1.执行命令时出错:
运行环境为linux,文件所在的文件系统为ext4(可通过mount命令查看)
#setfattr -n test-xattr -v "test" file0
setfattr: file0: Operation not supported (提示信息)
2.查看man setfattr和man 5 attr
其中的man 5 attr部分内容为:
。。。。。。。。。。。
EXTENDED ATTRIBUTE NAMESPACES
Attribute names are zero-terminated strings. The attribute name is always specified in the fully qualified namespace.attribute form, eg.
user.mime_type, trusted.md5sum, system.posix_acl_access, or security.selinux.
The namespace mechanism is used to define different classes of extended attributes. These different classes exist for several reasons, e.g. the
permissions and capabilities required for manipulating extended attributes of one namespace may differ to another.
Currently the security, system, trusted, and user extended attribute classes are defined as described below. Additional classes may be added in
the future.
。。。。。。。。。。。。。
所以可以知道setfattr -n指定的扩展属性名字要符合一定的要求。
3.按上面的名字要求再次执行命令
#setfattr -n trusted.test-attr -v "test" file0
(可以执行成功了,)
并且可以通过命令查看
#getfattr -d -m "" file0
输出结果如下:
# file: file0
trusted.test-xattr="test"
本文标签: linux下setfattr命令出错setfattr file0 Operation not supported
版权声明:本文标题:linux下setfattr命令出错:setfattr: file0: Operation not supported 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.roclinux.cn/b/1693589595a230990.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论