Re: How to access loop-aes mounted vfat filesystem as non-root user- help required!

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>I also notice a benefit of sudo mount: the filesystem
>does not seem to have to be specified in the
>commandline.

>mount as sudo must somehow work this out for itself.

It's dawned (!) on me that this is because I'm using
fat options in the mount line, so mount automatically
assumes it's a (v)fat filesystem.

The downside is I can then no longer mount eg
ext2-formatted volumes using the same script line.

So, either in the mount line or in /etc/fstab, I must
tell mount what filesystem type is to be mounted.




--- Matthias Schniedermeyer <ms@xxxxxxx> wrote:
> Phil H wrote:
> > Thanks again Matthias! I've had success at last
> (!)
> > by putting the options in the mount line (not
> fstab)
> > as follows):
> > 
> > sudo mount -o
> >
>
loop,noatime,noauto,user,exec,fmask=133,dmask=022,uid=1001,gid=50,encryption=aes256
> > /dev/fd0 /home/dsl/crypt1
> > 
> > I never thought I'd see the day!
> > 
> > BUT 
> > 
> > 1. I still can't get mount to work here as a
> non-root
> > user.
> > 
> > 
> >>I'd guess your mount-command misses the SUID-Bit.
> >>
> >>ls -la /bin/mount
> >>-rwsr-xr-x    1 root     root           84888 Mar
> 23
> >>12:58 /bin/mount
> > 
> > 
> > Unfortunately, no.  ls -la /bin/mount shows
> exactly
> > these same permissions including the SUID-bit.
> > So at present I still can't mount a loop device
> > without being root.
> > 
> > 2. And fstab options do not appear to be read by
> > mount:
> > 
> > I've changed the fstab line to:
> > /dev/fd0 /home/dsl/crypt1 vfat
> >
>
noatime,loop,encryption=aes256,noauto,user,exec,fmask=133,dmask=022,uid=1001,gid=50
> > 0
> > In theory mount should read in all the options
> from
> > this line from /etc/fstab, yes?
> 
> As long as you NOT specify a full commandline!
> You must let out the mount-point or the Device,
> otherwise (i guess) 
> mount won't look into fstab.
> 
> With a full command-line in fstab a
> mount /dev/fd0
> or
> mount /home/dsl/crypt1
> is enough.
> 
> > But sudo mount /dev/fd0 /home/dsl/crypt1 yields
> (you
> > can hear the floppy drive working):
> > "mount: you must specify the filesystem type"
> > So I do:
> > sudo mount -t vfat /dev/fd0 /home/dsl/crypt1
> yields
> > the error message:
> > mount: wrong fs type, bad option, bad superblock
> on
> > /dev/fd0,
> >        or too many mounted file systems
> > 
> > While not writing the options to fstab is hardly
> an
> > issue for a livecd boot - I'd need to restore this
> > line before each mount anyway (so why bother?) -
> I'm
> > now curious as to WHY it doesn't work.
> 
> :-)
> 
> > Any more ideas?
> 
> Many, but nothing which is relevant for this. :-)
> 
> > I've installed gnu-utils in case damnsmalllinux's
> > Busybox mount (base system) was the problem, but
> it
> > makes no difference whatsoever.  Gnu-utils
> apparently
> > has mount version mount-2.11x.
> > 
> >>A mixture of subtle differences in your distro
> >>paired with a little bit of missing experience.
> :-)
> > 
> > Without doubt a good deal of the latter!..:=)
> 
> I've been using Linux for 10 years this fall.
> So i guess i have a little advantage in using Linux
> all these years. :-)
> 
> 
> 
> 
> 
> 
> Bis denn
> 
> -- 
> Real Programmers consider "what you see is what you
> get" to be just as
> bad a concept in Text Editors as it is in women. No,
> the Real Programmer
> wants a "you asked for it, you got it" text editor
> -- complicated,
> cryptic, powerful, unforgiving, dangerous.
> 
> 
> -
> Linux-crypto:  cryptography in and on the Linux
> system
> Archive:      
> http://mail.nl.linux.org/linux-crypto/
> 
> 

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

-
Linux-crypto:  cryptography in and on the Linux system
Archive:       http://mail.nl.linux.org/linux-crypto/


[Index of Archives]     [Kernel]     [Linux Crypto]     [Gnu Crypto]     [Gnu Classpath]     [Netfilter]     [Bugtraq]
  Powered by Linux