Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I wanted to set ACL for a directory. For that it is important that the device should be mounted as acl on that directory.

But I do not want to add the acl mount in /etc/fstab. So I am tempoararily mounting the device to some temporary directory as acl and setting ACL and then unmounting it. Then, I'm mounting it to the original directory.

The code is below:


mkdir -p $tmp
mkdir -p $orig
mount -o acl $dev $tmp
mkdir -p $tmp/stdsymp
chgrp 557 $tmp/stdsymp
setfacl -m g:599:r $tmp/stdsymp
umount $tmp

mount $dev $orig

ll /mnt/backup shows

drwxr-xr-x 2 root _nokfsuimanage  4096 Sep  8 09:37 stdsymp

The group is being changed, but ACL is not set for the directory. Where is the problem?

share|improve this question

migrated from Sep 8 '11 at 9:24

This question came from our site for professional and enthusiast programmers.

If you disable the acl option, it turns off all ACL-related operations – not just setting, but also testing and even reading ACLs. You will have to mount with acl in order for your changes to be visible.

If you for some curious reason do not want to edit fstab, you can enable the option in the superblock with tune2fs -o acl $dev, and it will be applied anywhere the disk is mounted. (This is limited to ext[234] filesystems, however.)

FYI, you do not need to mount/unmount/mount – you can reconfigure a mounted filesystem with mount -o remount,acl /mnt1/backup.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .