What are the most secure permissions you would apply to the file?

You must apply permissions to a file
named/home/myname/myfile.txt, and you need to fulfill the following requirements:
You want full access to the file.
People in your group should be able to read the file. People in your group should not be able to write the file. People outside of your group should be denied access to the file. What are the most secure permissions you would apply to the file?

You must apply permissions to a file
named/home/myname/myfile.txt, and you need to fulfill the following requirements:
You want full access to the file.
People in your group should be able to read the file. People in your group should not be able to write the file. People outside of your group should be denied access to the file. What are the most secure permissions you would apply to the file?

A.
Chage 700/home/myname/myfile.txt

B.
Chage 744/home/myname/myfile.txt

C.
Chmod 640/home/myname/myfile.txt

D.
Chmod 064/home/myname/myfile.txt

Explanation:
To change access permissions for a file or directory, the chmod command is used.
The 6 in the 640 gives the owner, read and write permissions (execute is not required as this is a text file). The 4 in the 640 gives read only access to people in my group. And the 1D0-470
0 in the 640 prevents any access by anyone else.
Note:
Access permissions are expressed as three digits: user (=you), group, other.
Each digit codes permission as follows
1 = execute only
2 = write only
3 = write and execute (1 + 2)
4 = read only
5 = read and execute (4 + 1)
6 = read and write (4 + 2)
7 = read and write and execute (4 + 2 + 1)
Incorrect Answers:
A & B: The change age command is used for password aging for logon commands, and right off the bat are not
even the commands to be used to set permissions.
D: A value of 064 locks me out as owner (I can’t access my file), The groups have read and write access, and everyone else will have read-only access. All in conflict with the requirements of the question.



Leave a Reply 0

Your email address will not be published. Required fields are marked *