Chapter 14: Setting Ownership and Permissions

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

chmod

In a text-mode shell, you can use _____ to change permissions.

r, w, x

In regard to symbolic mode, a code specifying what the permission should be, such as the common _, _, or _ symbols, or various others for more-advanced operations.

4, 2, 6

In the leading digit of a four-digit octal code, set the leading value to _ to set the SUID bit, to _ to set the SGID bit, or to _ to set both bits.

user mask (umask)

The ____ ____ determines the default permissions for new files.

dash (-)

The absence of the permission is denoted by a ____ in the permission string.

chgrp group file

The chgrp command form for changing the group ownership of a file.

-R (--recursive)

The chown and chgrp commands both support a number of options that modify what they do. The most useful of these is this parameter, which causes a change in ownership of all the files in an entire directory tree.

chown user:group file

The chown command form for when changing the ownership of a file and its group.

chown user file

The chown command form for when changing the ownership of a file.

chown:group file

The chown command form used to change the group without changing the owner.

chown

The command to change the ownership of a file in the preferred text-mode manner.

chgrp

The command, aside from chown, that changes the group ownership.

l (Symbolic link)

The file contains the name of another file or directory. When Linux accesses the symbolic link, it tries to read the linked-to file. (Linux file type codes)

r, w, x

The presence of the permission is indicated by the letter _ for read, _ for write, or _ for execute.

execute bit

The superuser can read or write any file on the computer—even files that grant access to nobody. The superuser still needs an ________ ___ set to run a program file.

4

What's the octal number for r or read?

2

What's the octal number for w or write?

1

What's the octal number for x or execute?

rw-r--r--

Read and write permissions for the owner. Read-only permission for all others. (Permission string)

400

Read permission for the owner. No permission for anybody else. (Octal code)

r--------

Read permission for the owner. No permission for anybody else. (Permission string)

777

Read, write, and execute permissions for all users. (Octal code)

rwxrwxrwx

Read, write, and execute permissions for all users. (Permission string)

700

Read, write, and execute permissions for the file's owner only; all others have no access. (Octal code)

rwx------

Read, write, and execute permissions for the file's owner only; all others have no access. (Permission string)

a

A code indicating the permission set that you want to modify for all users.

o

A code indicating the permission set that you want to modify for other users.

g

A code indicating the permission set that you want to modify for the group.

u

A code indicating the permission set that you want to modify for the user.

b (Block device)

A file that corresponds to a hardware device to and from which data is transferred in blocks of more than 1 byte. Disk devices (hard disks, USB flash drives, CD-ROMs, and so on) are common block devices. (Linux file type codes)

c (Character device)

A file that corresponds to a hardware device to and from which data is transferred in units of 1 byte. Examples include parallel and RS-232 serial port devices. (Linux file type codes)

p (Named pipe)

A pipe enables two running Linux programs to communicate with each other in a one-way fashion. (Linux file type codes)

s (Socket)

A socket is similar to a named pipe, but it permits network and bidirectional links. (Linux file type codes)

sticky bit

A special filesystem flag that's used to protect files from being deleted by those who don't own the files.

+

A symbol indicating whether you want to add the stated value.

-

A symbol indicating whether you want to delete the stated value.

=

A symbol indicating whether you want to set the mode equal to the stated value.

three

A symbolic mode, by contrast, consists of _____ components.

rw-rw----

If you give the command chmod ug=rw report.tex on permissions that are set to r--------, how does it change?

root

As the _____ user, you can change the owner and group of any file. The file's owner can also change the file's group, but only to a group to which the user belongs.

d (Directory)

Disk directories are files, but they contain filenames and pointers to those named files' data structures. (Linux file type codes)

rwxr-xr-x

If you give the command chmod a+x bigprogram on permissions that are set to rw-r--r--, how does it change?

rw-r-----

If you give the command chmod g-w,o-rw report.tex on permissions that are set the rw-rw-rw-, how does it change?

rwxrwx---

If you give the command chmod o-rwx bigprogram on permissions that are set the rwxrwxr-x, how does it change?

- (Normal data file)

May be text, an executable program, graphics, compressed data, or just about any other type of data. (Linux file type codes)

ls -d (--directory)

Normally, if you type a directory name as an option, ls displays the contents of that directory. The same thing happens if a directory name matches a wildcard. Adding this parameter changes this behavior to list only the directory name, which is sometimes preferable.

symbolic links

Permissions on ________ _____ are always 777

755

Read and execute permission for all users. The file's owner also has write permission. (Octal code)

rwxr-xr-x

Read and execute permission for all users. The file's owner also has write permission. (Permission string)

rwxr-x---

Read and execute permission for the owner and group. The file's owner also has write permission. Other users have no access to the file. (Permission string)

666

Read and write permissions for all users. No execute permissions for anybody. (Octal code)

rw-rw-rw-

Read and write permissions for all users. No execute permissions for anybody. (Permission string)

660

Read and write permissions for the owner and group. No world permissions. (Octal code)

rw-rw----

Read and write permissions for the owner and group. No world permissions. (Permission string)

664

Read and write permissions for the owner and group. Read-only permission for all others. (Octal code)

rw-rw-r--

Read and write permissions for the owner and group. Read-only permission for all others. (Permission string)

640

Read and write permissions for the owner, and read-only permission for the group. No permission for others. (Octal code)

rw-r-----

Read and write permissions for the owner, and read-only permission for the group. No permission for others. (Permission string)

600

Read and write permissions for the owner. No permission for anybody else. (Octal code)

rw-------

Read and write permissions for the owner. No permission for anybody else. (Permission string)

644

Read and write permissions for the owner. Read-only permission for all others. (Octal code)

group permissions

These permissions determine what members of the file's group (who aren't its owner) can do with the file. ex: -rwx[r-x]r-x

owner permissions

These permissions determine what the file's owner can do with the file. ex: [-rwx]r-xr-x

other permissions (world permissions)

These permissions determine what users who aren't the file's owner or members of its group can do with the file. ex: -rwxr-x[r-x]

hidden bit

This concept refers to how Linux uses a file-naming convention to hide files from view: most tools hide files and directories from view if their names begin with a dot (.) At the command line, you can add the -a option to the other options in ls to view them.

set group id (SGID)

This option is similar to the SUID option, but it sets the group of the running program to the group of the file. It's indicated by an s in the group execute bit position in the permission string, as in rwxr-sr-x.

set user id (SUID)

This option tells Linux to run the program with the permissions of whoever owns the file rather than with the permissions of the user who runs the program.

.

This symbol refers to the current directory.

..

This symbol refers to the parent directly.

s, g

Use the _ symbolic code, in conjunction with u to specify the SGID bit, _ to specify the SGID bit, or both to set both bits.

chmod o+t file

When you want to add a sticky bit to a symbolic code, you enter this command.

1

When you want to add a sticky bit to an octal code, you add this number.

chmod o-t file

When you want to remove a sticky bit from a symbolic code, you enter this command.

0

When you want to remove a sticky bit from an octal code, you add this number.

750

rwxr-x——— 750 Read and execute permission for the owner and group. The file's owner also has write permission. Other users have no access to the file. (Octal code)


Kaugnay na mga set ng pag-aaral

Chapter 3 Cultures of Latin America

View Set

Chapter 8: Genetic Assessment and Counseling

View Set

World Geography PAP : Final Review

View Set

Pharm Test #4 Sample questions/rationale

View Set

N400 Ch19: Documenting & Reporting

View Set

Chapter 5: Life Insurance Premiums, Proceeds, and Beneficiaries

View Set

Ansc 3133 Postnatal Growth with Genetic Influences on Growth

View Set

Animal Physiology Exam 2: Nervous System, Sensory Physiology, and Muscle Phys

View Set

Urine is transported by the ureters, stored in the bladder, and eliminated through the urethra, aided by the micturition reflex (18-5)

View Set