星期二, 6月 09, 2009

Setting permissions on Linux files

Suppose that you want to grant permissions to the itineraries file. You want to grant the owner and the primary group full permissions – read, write, and execute – and to grant other users read permission only. Which command do you use to do this?

chmod 666 itineraries
chmod 774 itineraries
chmod g+x itineraries
chmod u+wx itineraries


Which group of letters are the file permissions that apply to a group in the string r--r-xrwx?

r--
r -x
rwx



Which command gives all users full read, write, and execute permissions for the marketing_plan file?

chmod g+x marketing_plan
chmod o-wx marketing_plan
chmod ugo+rwx marketing_plan



Which command do you use to make the /etc/inputrc file immutable?

chattr +i /etc/inputrc
chmod 666 inputrc
chmod g=rw inputrc
ls -l inputrc

推薦此文