We may come across this issue in a production environment while creating with the new file system. This can be resolved without rebooting the server let us see how to resolve the “Operation not supported” issue in RedHat Enterprise Linux 6 and variants like Centos 6, Oracle 6, Fedora and Scientific Linux servers.

Actual error:

[root@rhel6 ~]# setfacl -m u:babin:rwx /data/backup/books_order.xml
setfacl: /data/backup/books_order.xml: Operation not supported

 

When we create a new file system these mount options will not come by default. Here we are trying to provide special permission on a file which owned by other users “root”.

 

Note: This topic can be referred for security-related exam preparations.

 

First, check the existing file ownership using “getfacl”. And we found the owner of the file is “root” user.

[root@rhel6 ~]# getfacl /data/backup/books_order.xml
getfacl: Removing leading '/' from absolute path names
# file: data/backup/books_order.xml
# owner: root
# group: root
user::rw-
group::r--
other::r--

 

Now user “babin” need read, write, execute permission on a file “books_order.xml” which underlying in a newly created file system /data. When we try to run setfacl it throws “Operation not supported”.

[root@rhel6 ~]#
[root@rhel6 ~]# setfacl -m u:babin:rwx /data/backup/books_order.xml
setfacl: /data/backup/books_order.xml: Operation not supported
[root@rhel6 ~]#

 

Let us check whether newly created file system has the required defaults mount options.

[root@rhel6 ~]# tune2fs -l /dev/mapper/vg_data01-lv_data01 | grep 'mount option'
Default mount options: (none)
[root@rhel6 ~]#

 

In above output, we found the “acl” mount option not available by default. Let us add the “acl” mount option using “tune2fs” command and check the status again.

[root@rhel6 ~]# tune2fs -o acl /dev/mapper/vg_data01-lv_data01
tune2fs 1.41.12 (17-May-2010)
[root@rhel6 ~]#

[root@rhel6 ~]# tune2fs -l /dev/mapper/vg_data01-lv_data01 | grep 'mount option'
Default mount options: acl
[root@rhel6 ~]#

 

Now we have “acl” mount option in newly created file system just we need to remount the file system and verify it.

[root@rhel6 ~]# mount | grep 'data'
/dev/mapper/vg_data01-lv_data01 on /data type ext4 (rw,acl)
[root@rhel6 ~]#

 

Now we won’t get the “Operation not supported” error on the newly created file system. Provide with required “setfacl” permission and verify using “getfacl”.

[root@rhel6 ~]# getfacl /data/backup/books_order.xml
getfacl: Removing leading '/' from absolute path names
# file: data/backup/books_order.xml
# owner: root
# group: root
user::rw-
user:babin:rwx
group::r--
mask::rwx
other::r--

 

If we need to make this change persistent during reboots it good to have this entry in /etc/fstab.

/dev/mapper/vg_data01-lv_data01 /data ext4 defaults,acl 0 0

 

In XFS file system by default ACL will be included, we cannot disabled ACL in XFS file system.

 

That’s it, we have resolved the “Operation not supported” issue without rebooting any ongoing production environment.

 

هل كانت المقالة مفيدة ؟ 2 أعضاء وجدوا هذه المقالة مفيدة (2 التصويتات)