Re: mount -oloop 問題? - Linux

Table of Contents

man mount
(iii) Normally, only the superuser can mount file systems.
However, when fstab contains the user option on a line, any-
body can mount the corresponding system.

所以呢, 有一個變通的辦法, 在 fstab 加入以下這行:

/home/dir/of/user/loop /fullpath/of/mount/point/mnt auto loop,user,noauto 0 0

以上的第二個欄位, 必須是一個空的目錄

而第一個欄位的路徑是在 user 有權限可以存取的目錄, 例如就用他的 $HOME
第一個欄位的檔名則是一個不存在的檔案, 預留給 symbolic link 用.

之後就可以讓指定的使用者掛載映象檔:

ln -sf image.iso ~/loop
mount ~/loop

--
How shall my heart be unsealed unless it is broken?
By Kahlil Gibran

--

All Comments