This command affects the permissions on files and folders created by programs that respect the Mac OS X NSUmask settings. Programs should follow the value set for NSUmask, but there is no guarantee that they will. Also, users can override their own NSUmask setting at any time. The changes to the umask settings take effect at next login.

Warning: Setting permissions to group, or all, will allow any private, or confidential information in these folders to be visible to others. To prevent private files being accessed, the user should create a folder and restrict the permissions.

Changing Permissions

Use the chmod tool to change permissions for an item.

$ chmod securitygroup changetype permission fileorfolder

Parameter

Description

securitygroup

The person or group whose permission you are changing. Can be

 

any of the following:

 

 u - user

 

 g - group

 

 o - other

 

 all - all

 

 

changetype

Type of change. Whether you are adding or subtracting the

 

permission:

 

 “+” - add permission

 

 “-” - subtract permission

 

 

permission

The permission you are changing:

 

 r - read

 

 w - write

 

 x - execute

 

 

fileorfolder

The name of the file or folder to change.

 

 

To remove write access permission for group and others from the file myfile:

$ chmod go-w myfile

To add read and write access permission for group and others to files myfile1 and myfile2:

$ chmod go+rw myfile1 myfile2

To add read, write, and execute permission for everyone to myfile1:

$ chmod ugo+rwx myfile1

See the chmod man page for more information.

Chapter 8 Working with Users and Groups

125

Page 125
Image 125
Apple Mac OS X Server manual Changing Permissions, Use the chmod tool to change permissions for an item