2016-03-08 45 views

回答

1

如果你不記得八進制代碼,使用符號模式:

chmod u+rwx,g-rwx,o-wx,o+r file 

它的內容「用戶可以讀寫執行,組不能讀寫執行,別人不能寫執行,其他人可以讀取「

2

計算這些最簡單的方法是將它們從下面的表格加起來:

421421421 - So you just add the positions you need, for example 
rwx---r-- - You delete the numbers where you have no permissions and you get 
421---4-- - Now you just sum them in groups of three 
7 0 4 - And this is your permission 

一段時間後,你就可以在你的腦袋做這些很容易。

現在你申請到一個文件:

chmod 704 filename 

還是遞歸所有:

chmod -R 704 * 

或選擇性:

find . -iname '*.phpsh' -exec chmod 704 {} \;