Book-bot.com - read famous books online for free

Debian GNU/Linux : Guide to Installation and Usage by John Goerzen;Ossama Othman
page 109 of 298 (36%)

Tip: If you just installed Debian, you may be the only user. You can use
the adduser command to add more users to the system.

Mode

In addition to being owned by one user and one group, every file and
directory also has a mode, which determines who's allowed to read, write,
and execute the file (and run it, if it's a program). There are a few
other things also determined by the mode, but they're advanced topics so
we'll skip them for now.

The mode looks like this in the ls output: -rw-r-r-. For now, we'll
consider nine of these parts: those that control read, write, and execute
permissions for the user owning the file, the group owning the file, and
others (everyone on the system, sometimes called world).

In the mode line, the first ``element'' gives the file type. The - in this
case means it's a regular file. If it was d, we'd be looking at a
directory. There are also other possibilities too complex to go into here;
for details, see section 13.2.2 on page [*].

The remaining nine elements are used to display the file's mode. The basic
9 bits (read, write, and execute for user, group, and other) are displayed
as three blocks of rwx.

So if all permissions are turned on and this is a regular file, the mode
will look like this: -rwxrwxrwx. If it was a directory with all
permissions turned off for others and full permissions for user and group,
it would be drwxrwx--.
DigitalOcean Referral Badge