Linux許可權管理

來源:互聯網
上載者:User

1.      預設

       一個使用者(包括該使用者所起的進程)建立的檔案會有一個預設的許可權,這個許可權是$home/profile(or /etc/profile)中設定,使用者進入linux時載入,預設的設定為:umask 022(補碼,和許可權碼正好相反)

      如果只是當前session中用,只需在terminal中執行umask 022即可,如果要永久生效,需要修改profile然後執行一下,. /etc/profile

 

2.      查看使用者現狀:/etc/shadow,/etc/passwd,/etc/group

3.      修改檔案許可權:

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

      u=檔案所有者,g=group,o=other

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

      -R參數用的比較多,修改目錄下所有檔案許可權

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.