Thursday, January 21, 2010

Access Control Lists (ACL)

लिनक्स संबंधी सभी डाउन लॉड्‍स के लिए निम्न लिंक क्लिक करें:


हिन्दी लिनक्स ब्लॉग का एड्रेस:

All the files in Linux have some kind of permissions defined for owner, group members and others. These permissions, however, have some limitations, that is we can not set different permissions for different users. And that is why Linux has implementation for Access Control Lists. Red Hat Enterprise Linux 5.0 provides ACL support for NFS exported file system, ext3 file system and also for Samba.

For implementing ACL, we should have kernel support as well as acl package in Linux. The acl package provides utilities to add, remove, retrieve or modify the ACL information. The commands like mv and cp move and copy the ACL information linked with files and directories.
Here we will study the following topics associated with ACL:

1. Mounting the file system
2. Setting ACL
3. Retrieving ACL
4. Archiving file system with ACL

Mounting the file system

Before we can use ACL, we should make sure that the desired partition has been mounted with ACL support. For ext3 file system we can use following command:

# mount -t ext3 -o acl device_name partition

As:

# mount -t ext3 -o acl /dev/volgroup1/logvol1 /home/mylv1

Or, we can use /etc/fstab file and make an entry like this:

LABEL=mylv1 /home/mylv1 ext3 acl 1 2

If the above ext3 file system is accessed through Samba and ACL have been enabled for it, Then the ACLs are effected because Samba has been compiled with the acl support option.

Similarly, the ACLs are effected for NFS also. If we do not want ACL on NFS share, we can disable it by including no_acl option in /etc/exports file.

The ACLs are of two types:

1) Default ACL and 2) Access ACL.

The default ACL can be associated with the directory only. These are optional. Whereas, the access ACL can be associated with specific file as well as directory both.

We can configure ACL for:

1. Per user
2. Per group
3. For users not in user group for file
4. Through the effective rights mask

No comments:

Post a Comment