I am trying to run SELinux chcon
command on a UBIFS root filesystem and I get chcon: failed to change context of '/' to 'system_u:object_r:root_t': Operation not supported
. I understand SELinux needs filesystem support for extended attributes. For Linux kernel <3.4, CONFIG_UBIFS_FS=y
will enable extended attributes for UBIFS by default.
I read from here that xattr
should automatically be enabled without additional mount options.
Extended attributes UBIFS supports extended attributes if the corresponding configuration option is enabled (no additional mount options are required). It supports the user, trusted, and security name-spaces. However, access control lists (ACL) support is not implemented.
Note, currently mkfs.ubifs ignores extended attributes and does not write them to the target file-system image.
I am building the image using Yocto, and added xattr
to DISTRO_FEATURES as well. What am I missing here?