![](/img/trans.png)
[英]restricting application stored data access in disk using Linux user permissions
[英]Restricting linux user to a folder
我需要為用戶創建一個單獨的文件夾,允許他只執行一個二進制文件。 他可以調用python / perl並運行程序。 但是用戶不應該刪除其目錄中的任何文件夾,也不應該能夠查看任何其他目錄。 我怎樣才能實現這一目標?
如果他們只通過ssh訪問,那么ChrootDirectory
就是你要走的路。 簡而言之,您在另一個目錄中創建一個假/
系統,允許用戶運行所有程序及其所需的庫。
有關更全面的指南,請參閱sshd_config
手冊頁的ChrootDirectory
部分,或者像Here這樣的地方。
CHMOD完成這項工作
chmod 755 directory/filename
7 user (**owner**) has full access.
5 allows **group** user "read" and "execute" permissions, but
not "write" permissions.
5 allows **others** "read" and "execute" permissions,
but not "write" permissions.
供你參考 :
5允許“讀取”和“執行”權限,但不允許“寫入”權限。 A 6允許讀寫權限,但不允許“執行”。 4將僅“讀取”。 A 2只是“寫”,1只是“執行”。
進一步參考: 鏈接
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.