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.

# getfacl /data/backup/books_order.xml

[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”.

# setfacl -m u:babin:rwx /data/backup/books_order.xml

[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.

# tune2fs -l /dev/mapper/vg_data01-lv_data01 | grep 'mount option'

[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.

# tune2fs -o acl /dev/mapper/vg_data01-lv_data01
# tune2fs -l /dev/mapper/vg_data01-lv_data01 | grep 'mount option'

Output for above command.

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

[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.

# mount -t ext4 -o remount,acl /dev/mapper/vg_data01-lv_data01 /data
# mount | grep 'data'

[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”.

Set the ACL by running below command with option and argument.

# setfacl -m u:babin:rwx /data/backup/books_order.xml

To verify the above command run getfacl without any options and argument.

# getfacl /data/backup/books_order.xml

[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.

Conclusion:

The solution available for “Operation not supported” due to ACL can be resolved on the fly by following few of steps. Hope this help you to resolve your issue. If you found this useful provide your comments. Subscribe to our newsletter and stay updated with us.

LEAVE A REPLY

Please enter your comment!
Please enter your name here