2

I'm trying to use setfattr, but always get Operation not supported

In my home directory, I'm doing the following:

touch delete.me
setfattr -n naomi -v washere delete.me

This returns setfattr: delete.me: Operation not supported.

My home directory is ext4 and delete.me definitely exists. I'm on Fedora 25. Any idea why this is not working?

4

You can't just use any name. You need to select a namespace. For arbitrary attribute name, you'd need to use the user namespace:

setfattr -n user.naomi -v washere delete.me

(see man 5 attr for details).

For ext4, the ext_attr feature must be enabled (on by default). Check with:

sudo debugfs -R stats /dev/block/device | grep -w ext_attr

And to be able to use attributes in the user namespace, the filesystem should be mounted with the user_xattr option enabled (also on by default). Check with:

grep user_xattr /proc/self/mountinfo

If it returns nothing, also check the default mount options in the debugfs output above.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.