www.delorie.com/gnu/docs/textutils/coreutils_81.html   search  
Buy GNU books!

GNU Core-utils

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

13.3 chmod: Change access permissions

chmod changes the access permissions of the named files. Synopsis:

chmod [option]... {mode | --reference=ref_file} file...

chmod never changes the permissions of symbolic links, since the chmod system call cannot change their permissions. This is not a problem since the permissions of symbolic links are never used. However, for each symbolic link listed on the command line, chmod changes the permissions of the pointed-to file. In contrast, chmod ignores symbolic links encountered during recursive directory traversals.

If used, mode specifies the new permissions. For details, see the section on 26. File permissions.

The program accepts the following options. Also see 2. Common options.

Verbosely describe the action for each file whose permissions actually changes.

Do not print error messages about files whose permissions cannot be changed.

Verbosely describe the action or non-action taken for every file.

Change the mode of each file to be the same as that of ref_file. See section 26. File permissions. If ref_file is a symbolic link, do not use the mode of the symbolic link, but rather that of the file it refers to.

Recursively change permissions of directories and their contents.

  webmaster     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003