Which of these commands will set the following permissions on file1.txt?
User = Read, Write, Execute
Group = Read, Execute
Others = Read
A. chmod o=rwx,g=rx,u=r file1.txt
B. chmod u=rwx, g=rx, u=r file1.txt
C. chmod 754 file1.txt
D. chmod file1.txt 754
Answer:
B. chmod u=rwx, g=rx, u=r file1.txt
C. chmod 754 file1.txt
chmod u=rwx, g=rx, o=r file1.txt
The chmod command can be used to set permissions by specifying the exact permissions (r, w, and/or x) for users (u), group (g), and others (o) followed by the filename they are to be set for.
chmod 754 file1.txt
The chmod command can be used to set permissions by specifying them in octal format. Read has a value of 4, write has a value of 2, and execute has a value of 1. They are in the order of user, group, and then other. You just have to add up the values of each of the permissions for each of the places. Read (4) + Write (2) + Execute (1) for the user gives us 7 as the first character. Read (4) + Execute (1) gives us 5 for the group. Read (4) only is set for all other users. The full result is 754. The syntax is important so after the chmod comes the permissions to be set followed by the filename(s).
You might also like to view...
The ____ object verifies that the object on a Web form contains data.
A. EmptyObject B. ObjectNull C. RequiredFieldValidator D. ObjectRequired
What is a server-based network, and what are it's advantages and disadvantages?
What will be an ideal response?
The ____ file holds temporary data that is used to update the master file.
A. directory B. transaction C. merge D. database
Collections of type List
a) only other lists b) only integers c) objects of any one type d) None of the above