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?

1 Answer 1

5

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.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.