I have tried to set Extended ACL for the folder ssam and ended
with a "Permission Denied" message at the end.
I have made sure that the ACL is enabled and is added in /etc/fstab for /home.
Below are the details.
[root@localhost boot]# cat config-2.6.32-358.2.1.el6.x86_64 | grep POSIX_ACL
CONFIG_EXT2_FS_POSIX_ACL=y
CONFIG_EXT3_FS_POSIX_ACL=y
CONFIG_EXT4_FS_POSIX_ACL=y
CONFIG_FS_POSIX_ACL=y
CONFIG_XFS_POSIX_ACL=y
CONFIG_BTRFS_FS_POSIX_ACL=y
CONFIG_TMPFS_POSIX_ACL=y
CONFIG_JFFS2_FS_POSIX_ACL=y
[root@localhost boot]#
Below is my /etc/fstab where I have enabled acl for the /home directory.
[root@localhost boot]# cat /etc/fstab
#
# /etc/fstab
# Created by anaconda on Thu Mar 14 13:54:35 2013
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
UUID=e4dd1184-719a-43b3-bc3b-3597eff17209 / ext4 defaults 1 1
UUID=f91a2e20-ef6d-4394-bc24-3ef4745055e6 /boot ext4 defaults 1 2
UUID=c587798e-f13f-42fe-b6d2-7f009c9b8c72 /home ext4 defaults,acl 1 2
UUID=d691e668-6a9e-41af-b225-76dfd2463abf /usr ext4 defaults 1 2
UUID=4c2ed75e-f536-43c9-a9a0-efbaa097a3f0 swap swap defaults 0 0
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
/media/Films /dev/Films/Vol_Films ext4 rw 0 0
and this is what I have done with setfacl (Kindly note that ssam is the home folder for the user ssam)
root@localhost home]# setfacl -d -m u:chandu:rwx,m:rwx ssam
[root@localhost home]# getfacl ssam
# file: ssam
# owner: ssam
# group: ssam
user::rwx
group::---
mask::rwx
other::---
default:user::rwx
default:user:chandu:rwx
default:group::---
default:mask::rwx
default:other::---
[root@localhost home]# su chandu
[chandu@localhost home]$ cd ssam
bash: cd: ssam: Permission denied
[chandu@localhost home]$
I appreciate your suggestions in solving this problem.
Best Regards.
Best Answer
You have set default ACLs only! That are those for new objects created in this directory. You need this command: