158

Using chmod to Modify ACLs

Using chmod, you can add and delete ACEs for a file or a folder. Here are a few of the parameters to be used with ACLs:

Parameter

Description

+a

Adds an entry to the ACL

 

 

+ai

Adds an inherited entry

 

 

-a

Removes an entry from the ACL

 

 

The following are some of the common permissions you can assign to files:

Permission

Description

delete

Grants permission to delete the item

 

 

readattr

Read an object’s basic attributes

 

 

read

Read the object

 

 

write

Write to the object

 

 

writeattr

Write an object’s basic attributes

 

 

readextattr

Read extended attributes

 

 

writeextattr

Write extended attributes

 

 

readsecurity

Read an object’s extended security information (ACL)

 

 

writesecurity

Write an object’s security information (ACL)

 

 

chown

Change an object’s ownership

 

 

The following are the permissions applicable to folders:

Permission

Description

list

List entries

 

 

add_file

Add a file

 

 

add_sudirectory

Add a subfolder

 

 

delete_child

Delete an object

 

 

To grant a user write permission for a file:

Enter the following command, replacing user1 with the name of the user you are granting permission to and file1 with the name of the file:

$ chmod +a "user1 allow write" file1

To deny a guest read permission for a file:

Enter the following command, replacing file1 with the name of the file:

$ chmod +a "guest deny read" file1

Chapter 9 Working with File Services

Page 158
Image 158
Apple Mac OS X Server manual Using chmod to Modify ACLs, Following are the permissions applicable to folders