The chmod command


The chmod command changes the permissions of a file or directory

The chmod command will usually not produce an output unless you have made an error.

UNIX files all belong to a specific user and group, and each file can be read, written (edited) or executed

The chmod command allows you to change the file permissions to allow only specific people to view your files and directories.

NOTE: If you have a web page, the "public_html" directory must be readable by everyone, and all the files in the directory must be world readable.

The easiest way to remember the chmod command is

Thus the command

chmod a+r file1

would give everybody the ability to read the file named "file1"

The command

chmod o-rw file1

Would remove the read and write permissions from others besides the owner and members of the group

Other popular chmod commands include

For more help with the chmod command or to see the online UNIX manual and all the extensions to the chmod command, click here.


UNIX

Commands

Directory

File

Other

Help

Search