Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Jan 1998 00:45:38 -0500 (EST)
From:      Drifter <drifter@stratos.net>
To:        freebsd-questions@FreeBSD.ORG
Subject:   Mounting a floppy, ZIP drive, or partition as a non-root user
Message-ID:  <199801260545.AAA00895@stratos.net>

next in thread | raw e-mail | index | archive | help

	Hi,

	I have a quick question about mounting file systems as a non-
root user. Since I am confident in the security of my home system, I would
like the ability for my "drifter" account to mount and unmount my floppy
at will.
	Unfortunately, I have not been able to figure it out. Yes, I am
being lazy in not wanting to su root all the time, and when I am in X, I
don't like switching between graphics mode and text mode VTs.
	mtools are useful for most floppy applications, but not my UFS
ZIP drive or cdrom.
	So, without writing an expect script, is there a way to allow
non-root users to mount a floppy drive?
	Here is what I have tried so far:

	1) make sure /dev/fd0* (all forms of fd0, such as fd0a and fd0.1440)
           have permissions set to rw for user, group, and other.
	2) /mnt's permissions are set to 777 (I suppose 666 would suffice
	   as well)
        3) I checked /sbin/mount: permissions allow user, group, and other
	   read/execute status. I took that one step further and added
	   suid and sgid bits to that and /sbin/mount_msdos, making
	   sure I chown'd the files root.bin first.
	4) And (oh yeah) I tried "man mount" and "man mount_msdos".
	   Unfortunately, there appeared to be no helpful information on
	   that particular topic.
	5) I checked the file permissions on /etc/fstab, though I
	   didn't think it would help. It didn't.
	6) I even tried the suid route on /lkm/msdos_mod.o, as well, though
	   I don't think that has anything to do with the actual mounting.

	In all cases, drifter's attempts to mount the device failed, though
root can of course do so.  

	drifter$ mount -t msdos /dev/fd0 /mnt
	msdos: /dev/fd0: Permission denied
	
	The reason I want to do this is to allow user "drifter" to
mount and unmount a floppy (or ZIP) drive by point-and-click while in an
X-session.
	Also, user "drifter" is a member of group wheel. I am using 
FreeBSD 2.2.5-RELEASE.
	If anyone can help, I would appreciate it.

	-Drifter
----
drifter@stratos.nospam.net (remove nospam to send)
     "Ever notice that in every commercial about the Internet, advertising
geniuses can't resist having a bunch of kids staring into a monitor, awe-
struck, looking at a whale jumping out of the ocean? Or is it just me?"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199801260545.AAA00895>