Linux權限管理

1.      默認linux

       一個用戶(包括該用戶所起的進程)建立的文件會有一個默認的權限,這個權限是$home/profile(or /etc/profile)中設定,用戶進入linux時加載,默認的設置爲:umask 022(補碼,和權限碼正好相反)session

      若是隻是當前session中用,只需在terminal中執行umask 022便可,若是要永久生效,須要修改profile而後執行一下,. /etc/profilespa

 

2.      查看用戶現狀:/etc/shadow,/etc/passwd,/etc/group進程

3.      修改文件權限:ci

   chmod741 a = chmod u+rwx g+w o+x aterminal

      u=文件全部者,g=group,o=otherio

      r=4,w=2,x=1 (eg.555=u+rx g+rx o+rx)ast

      -R參數用的比較多,修改目錄下全部文件權限file

相關文章
相關標籤/搜索