What is CHMOD command?

Are you preparing for IT certification? With practice questions, study notes, interactive quizzes, tips and technical articles, uCertify PrepKits ensure that you get a solid grasp of core technical concepts to ace your certification exam in first attempt.

What is CHMOD command?

Rating:

The CHMOD command is used to change file access permissions in Linux.

Syntax:

CHMOD [option] [mode] <file1, file2, ...>

Option: The following is a list of some important options that can be provided with the command:


OptionDescription
-c, --changesProvides information when a change is made.
-f, --silent, --quietSuppresses most error messages.
-R, --recursiveChanges files and directories recursively.
--helpDisplays the help of the command.
--versionDisplays version information of the command.

Mode: Mode is written in the following format:

[ugoa] [+-=] [rwxXstugo]

The combination of ugoa specifies the users for whom the file access permissions will be changed. In ugoa, u is for the user who owns the file, g is for other users in the file group, o is for other users not in the file group, and a is for all users.

The operator + adds the specified permissions to the existing permissions of each file. The - operator removes, and the = character specifies that the specified permissions are the only permissions for that file.

The combination of rwxXstugo is permission type. In rwxXstugo, r is for read, w is for write, x is for execute, X is to execute only if the file is a directory or already has execute permission for some user, s is to set user or group ID on execution, t is to save program text on swap device, u are the permissions that the user who owns the file currently has for it, g are the permissions that other users in the file group have for the file, and o are the permissions that other users not in the file group have for the file.


Rating:



Other articles

Click here to Article home

 
uCertify.com | Our Company | Articles | Privacy | Security | Contact Us
MCSE: MCSA, MCTS, MCITP    JAVA Certification: SCJP, SCWCD Cisco Certification: CCNA, CCENT, A+, Network+, Security+
Oracle Certification: OCP 9i, OCP 10g, OCA 9i, OCA 10g CIW foundation    EC-212-32    CISSP    Photoshop ACE    Adobe Flash ACE
© 2008 uCertify.com. All rights reserved. All trademarks are the property of their respective owners.