LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   question about setting ACL (https://www.linuxquestions.org/questions/linux-newbie-8/question-about-setting-acl-4175468193/)

karthik-naren 07-02-2013 11:23 AM

question about setting ACL
 
/dev/sda8 is permanently mounted on /a.

As apply ACL for user sam on /a.

# setfacl -m u:sam:rwx /a
setfacl: /a: Operation not supported.

Here is the steps I followed..



1 useradd sam
2 passwd sam
3 mkdir /a

Code:

# fdisk /dev/sda

The number of cylinders for this disk is set to 5221.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
  (e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): n
First cylinder (3842-5221, default 3842):
Using default value 3842
Last cylinder or +size or +sizeM or +sizeK (3842-5221, default 5221): +200M

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
The kernel still uses the old table.
The new table will be used at the next reboot.
Syncing disks.

# partprobe
# mkfs.ext3 /dev/sda8
# mount  /dev/sda8 /a

Code:

# mount
/dev/sda2 on / type ext3 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/sda6 on /home type ext3 (rw)
/dev/sda5 on /var type ext3 (rw)
/dev/sda3 on /usr type ext3 (rw)
/dev/sda1 on /boot type ext3 (rw)
tmpfs on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
none on /proc/fs/vmblock/mountPoint type vmblock (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
/dev/sda8 on /a type ext3 (rw)

Code:

# vi /etc/fstab

LABEL=/                /                      ext3    defaults        1 1
LABEL=/home            /home                  ext3    defaults        1 2
LABEL=/var              /var                    ext3    defaults        1 2
LABEL=/usr              /usr                    ext3    defaults        1 2
LABEL=/boot            /boot                  ext3    defaults        1 2
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
LABEL=SWAP-sda7        swap                    swap    defaults        0 0
/dev/sda8              /a                      ext3    defaults        1 2

Code:

# ls -ld
drwxr-x--- 15 root root 4096 Jun 21 23:34

Now as I try to apply ACL this is what the message am getting

Code:

# setfacl -m u:sam:rwx /a
setfacl: /a: Operation not supported


szboardstretcher 07-02-2013 11:52 AM

acl has to be enabled on the mount

Code:

mount -o remount,acl /a

karthik-naren 07-02-2013 11:56 AM

if i try to change the permissions of /a

they wont change


# chmod o=rwx /a

# ls -ld
drwxr-x--- 15 root root 4096 Jun 21 23:34 .

smeuth 07-02-2013 11:58 AM

ACL Additions
 
In order to add acl level permissions to a file system, you need to add it to your /etc/fstab file. Select the file system using your favorite editor and then add ",acl" to the listing.

For example:
/dev/sda8 /a ext3 defaults,acl 1 2

Then bounce the system and you should be good to go. Bouncing of the system might be optional depending on the type of linux you are running, you might be able to get by with the remount command either ran as root or using sudo level permissions.


All times are GMT -5. The time now is 11:03 PM.