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

Re: mounting loopback as non-root user



On Tue, 2003-12-30 at 14:20, Jan Minar wrote:
> On Tue, Dec 30, 2003 at 02:57:24PM -0500, Paul Morgan wrote:
> > On Tue, 30 Dec 2003 12:09:37 -0600, Rob Benton wrote:
> > 
> > > I guess I've never payed much attention to this until today but you have
> > > to be root to mount with the -o loop option.  At least on my machine I
> > > do.  Mount has the suid bit set.  Is there some way I can allow non-root
> > > users to mount loop devices?
> > 
> > Just off the top of my head, I think that it's probably a bad idea to
> > give a user the direct ability to mount on a loop device.  How do you
> > control what the user mounts?  It's an invitation to figure out how to
> > build an fs image with an suid binary on it and root your system,
> 
> mount -o nosuid,nodev
> 
> --there's no difference between a loop device and any other device.
> There's the same problem with removable media, network shares, etc.
> It's just mount(8) will not accept `-o' switch from a non-root user.
> 
> And don't think it's of no use:  Anywhere superuser can use the loop
> device (encryption, fs-images, games, simulation, ...) mere users would
> use it, too.  It's even cumbersome sometimes to do these things as root.

Ok I knew there was probably a reason.  In this case I'm the only one
mounting and I'm the only user on my system so it would just be to save
me some extra keystrokes.  I'll probably sudo it since I have apt set up
that way, too.



Reply to: