254 You Are Here
chmod 664 sneakers.txt
Tip: Beware 666 and 777. Biblical implications aside, either of these settings will allow
everyone to read and write to a file or directory. Such settings as these could allow
tampering with sensitive files, so in general, it’s not a good idea to allow these settings.
Here’s a list of some common settings, numerical values and their meanings:
-rw------- (600) – Only the user has read and write permissions.
-rw-r--r-- (644) – Only user has read and write permissions; the group and others can read
only.
-rwx------ (700) – Only the user has read, write and execute permissions.
-rwxr-xr-x (755) – The user has read, write and execute permissions; the group and others
can only read and execute.
-rwx--x--x (711) – The user has read, write and execute permissions; the group and others
can only execute.
-rw-rw-rw- (666) – Everyone can read and write to the file. Bad idea.
-rwxrwxrwx (777) – Everyone can read, write and execute. Another bad idea.
Here are a couple common settings for directories:
drwx------ (700) – Only the user can read, write in this directory.
drwxr-xr-x (755) – Everyone can read the directory, but its contents can only be changed by
the user.
Summary: You can change permissions with the chmod command by using letters
or numbers. Type chmod (permissions) file to change permissions of a file or
directory.
You’ve already come quite a distance in learning about your Red Hat Linux system – from navigation
to setting and changing permissions.
Now, it’s time to learn a little more about managing what you have on your system. The following
chapter wil help you to understand a little more about file types and how to work with a variety of
commands.
Comments to this Manuals