Changing Permissions/Owner/Group

Permissions of files and directories can be changed using the command chmod (change mode). This command can either be used with a numerical argument, which states exactly what the permission should be, or with a symbolic argument, which may change only part of the permissions (such as only the permissions for the user). Here is the general syntax of the chmod command:

chmod perm-changes file1 file2 ...

perm-changes specifies what permissions to change and may be specified in either numeric or symbolic mode, as you shall see shortly.

Only the user who owns a given file may change the permissions for this file. (An exception to this rule is, of course, the superuser, who may do anything!)

The chmod program changes ...

Get Practical UNIX now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.