The following example will demonstrate how to change permissions using chmod in symbolic mode.

Examples

This example demonstrates how to remove group read permission from ball file:

$ ls -l ball
-rw-r--r-- 1 chuck peanuts 1320 Oct 16 12:15 ball
$ chmod g-r ball
$
ls -l ball
-rw----r-- 1 chuck peanuts 1320 Oct 16 12:15 ball
$

This shows how to deny read permission to group peanuts on the ball file:

$ chmod g-r ball
$
ls -l ball
-rw------- 1 chuck peanuts 11320 Oct 16 12:20 ball
$

Here we are adding execute permission for the owner on the ball file:

$ chmod u+x ball
$
ls -l ball
-rwx------ 1 chuck peanuts 11320 Oct 16 12:21 ball
$

This will set read and execute permissions on the ball file for all users:

$ chmod a=rx ball
$
ls -l ball
-r-xr-xr-x 1 chuck peanuts 11320 Oct 16 12:21 ball
$