[CLUE-Tech] User Mount of Encrypted Volumes vi Loopback

Match Grun match at dimensional.com
Mon Nov 24 21:35:03 MST 2003


On Sun, 23 Nov 2003 18:22:51 -0700
"Jed S. Baer" <thag at frii.com> wrote:

> Hi Folks.
> 

> 
> So, I have an encrypted ext2 filesystem created, and it's mountable by
> root. Here's the question. How can an ordinary user mount it? I
> assumed it would be something similar to the way things such as the
> floppy and cdrom devices work. And, looking at the options for the
> mount command, and/etc/fstab, it would appear that simply putting the
> "user" option into the fstab line for the file would make it all work.
> 
> [ /etc/fstab ]
> /home/jbaer/cranium.pcm /home/jbaer/freezer ext2 noauto,owner,noatime
> 0 0
> 
> I also messed around with also adding options in fstab for the
> encryption pieces and loopback, and these all work just fine when
> mounting as root.
> 

Jed,

Maybe you should mount this as yourself somewhere in your home
directory. Don't use fstab, but your .bashrc script to perform the
mount. You own the directory and also the mount point so you should not
have a permissions problem. This is a similar trick that xfsamba uses to
mount smb shares in a users home directory.

Match


> But the point of this exercise is for the ordinary user (me, in this
> case) to be able to maintain (including mount/umount) their own
> encrypted "safe" type thing, and store anything encrypted, without the
> constraints of some off-the-shelf package which might store only
> certain types of data, e.g. password records.
> 
> However, when I try to mount the file (which I own), I get the message
> "only root can mount {filename} on {mount point}. I've changed file
> permissions and ownership on the /dev/loop* devices, with no effect,
> and I doubted the problem was there in the first place. By the error
> message, it feels like something which should be correctable in
> /etc/fstab, which is where the options are for whether ordinary people
> can mount things.
> 



More information about the clue-tech mailing list