星期三, 6月 10, 2009

Using special permission modes in Linux

Suppose that you want to implement a set user ID (SUID) for the software_data file. You also want to change the permissions for the file to read, write, and execute for the owner, to read only for the group, and to execute for all other users using numeric notation. What is the command you use to do this?

chmod 2741 software_data
chmod 4741
chmod 4741 software_data
chmod 741 software_data



The umask command sets default permissions for all new files you create. What does the command umask 123 do?

It sets file owner permissions to read and write
It sets group permissions to read and execute
It sets group permissions to read only
It sets other users' access rights to write only
It sets the permissions of other users to read





Suppose that you decide to use symbolic notation to specify a set group ID (SGID) for the staff_data file for the group that owns the file. Which command do you use to do this?

chmod g+s staff_data
chmod +s staff_data
chmod s+g staff_data





Suppose that you decide to set a sticky bit for the african_safaris file. You also want to reset the file's permissions using the chmod command. Which command will do this?

chmod +t
chmod +u
chmod u+t african_safaris
chmod t+u african_safaris

推薦此文