Re: Mounting data CD

2004-10-20 Thread epilogue
On Wed, 20 Oct 2004 12:17:02 -0400
Steven Friedrich <[EMAIL PROTECTED]> wrote:

> I'm trying to mount a data CD as a normal user.  It works fine as
> root, but I want average users to be able to do it.
> 
> Here's the session:
> % mount_cd9660 /dev/acd0c /cdrom
> mount_cd9660: /dev/acd0c: Operation not permitted
> % mount_cd9660 /dev/acd0c /mnt
> mount_cd9660: /dev/acd0c: Operation not permitted
> 
> I noticed in dev:
> % ll /dev/*cd*
> crw-rw-rw-  4 root  operator  117,   0 Oct 16 19:14 /dev/acd0a
> crw-rw-rw-  4 root  operator  117,   0 Oct 16 19:14 /dev/acd0c
> crw-rw-rw-  1 root  operator  117,   8 Jun 15  2003 /dev/acd1c
> crwxrwxrwx  2 root  operator   15,   0 Oct 16 19:14 /dev/cd0a
> crwxrwxrwx  2 root  operator   15,   2 Oct 16 19:14 /dev/cd0c
> crw-r-  2 root  operator   29,   0 Oct 16 19:14 /dev/mcd0a
> crw-r-  2 root  operator   29,   2 Oct 16 19:14 /dev/mcd0c
> crw-rw-rw-  4 root  operator  117,   0 Oct 16 19:14 /dev/racd0a
> crw-rw-rw-  4 root  operator  117,   0 Oct 16 19:14 /dev/racd0c
> crwxrwxrwx  2 root  operator   15,   0 Oct 16 19:14 /dev/rcd0a
> crwxrwxrwx  2 root  operator   15,   2 Oct 16 19:14 /dev/rcd0c
> crw-r-  2 root  operator   29,   0 Oct 16 19:14 /dev/rmcd0a
> crw-r-  2 root  operator   29,   2 Oct 16 19:14 /dev/rmcd0c
> crw-r-  2 root  operator   45,   0 Oct 16 19:14 /dev/rscd0a
> crw-r-  2 root  operator   45,   2 Oct 16 19:14 /dev/rscd0c
> crw-r-  2 root  operator   69,   0 Oct 16 19:14 /dev/rwcd0a
> crw-r-  2 root  operator   69,   2 Oct 16 19:14 /dev/rwcd0c
> crw-r-  2 root  operator   45,   0 Oct 16 19:14 /dev/scd0a
> crw-r-  2 root  operator   45,   2 Oct 16 19:14 /dev/scd0c
> crw-r-  2 root  operator   69,   0 Oct 16 19:14 /dev/wcd0a
> crw-r-  2 root  operator   69,   2 Oct 16 19:14 /dev/wcd0c
> 
> Yes, I've been changing permissions in an attempt to make it work.
> 
> How would anyone know which device to use?
> And why can't I get it to work by changing permissions?

very recently bumped into this headache myself.  you need to
manually change the sysctl:

from ---> vfs.usermount: 0
to -> vfs.usermount: 1

and setting it in /etc/sysctl.conf should make it right automatically
upon next boot.

[warning: not sure if this next part is simply due to my inexperience]

i found that the user was not able to mount to anything hanging
directly off of  '/' (ex. /mnt /cdrom /floppy) - even if i messed with
the perms.  to solve this, i created the desired mount points (simply
empty directories) in that user's $HOME (with user ownership, group, and
rwx perms).  this solved the problem.

just make sure that your users only try to mount to ~/mntpoint


hth,
epi


> I've went thru the handbook and also Dru Lagvigne's (is that right?)
> articles on OnLamp to no avail.
> ___
> [EMAIL PROTECTED] mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to
> "[EMAIL PROTECTED]"
> 
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Mounting data CD

2004-10-20 Thread Radek Kozlowski
On Wed, Oct 20, 2004 at 12:17:02PM -0400, Steven Friedrich wrote:
> I'm trying to mount a data CD as a normal user.  It works fine as root, but I 
> want average users to be able to do it.

http://www.freebsd.org/doc/en/books/faq/disks.html#USER-FLOPPYMOUNT

-Radek
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Mounting data CD

2004-10-20 Thread Karel J. Bosschaart
On Wed, Oct 20, 2004 at 09:21:16AM -0700, Kevin Glick wrote:
> > -Original Message-
> > From: [EMAIL PROTECTED] 
> > [mailto:[EMAIL PROTECTED] On Behalf Of 
> > Steven Friedrich
> > Sent: Wednesday, October 20, 2004 9:17 AM
> > To: [EMAIL PROTECTED]
> > Subject: Mounting data CD
> > 
> > I'm trying to mount a data CD as a normal user.  It works 
> > fine as root, but I 
> > want average users to be able to do it.
> > 
> > Here's the session:
> > % mount_cd9660 /dev/acd0c /cdrom
> > mount_cd9660: /dev/acd0c: Operation not permitted
> > % mount_cd9660 /dev/acd0c /mnt
> > mount_cd9660: /dev/acd0c: Operation not permitted
> 
> Normal users don't have permissions to mount to /cdrom or /mnt.
> They should be able to mount in their home directory.  You might

Since I didn't see it mentioned: user mounting also requires that 
vfs.usermount is set to 1. Use sysctl or /etc/sysctl.conf to achieve 
this.

Karel.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


RE: Mounting data CD

2004-10-20 Thread Kevin Glick
> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of 
> Steven Friedrich
> Sent: Wednesday, October 20, 2004 9:17 AM
> To: [EMAIL PROTECTED]
> Subject: Mounting data CD
> 
> I'm trying to mount a data CD as a normal user.  It works 
> fine as root, but I 
> want average users to be able to do it.
> 
> Here's the session:
> % mount_cd9660 /dev/acd0c /cdrom
> mount_cd9660: /dev/acd0c: Operation not permitted
> % mount_cd9660 /dev/acd0c /mnt
> mount_cd9660: /dev/acd0c: Operation not permitted
> 
And, if I'd read your message better the first time, I would
have noticed that you're getting the error from the mount
command, and not the directory.  You definitely want to look
at sudo.

Kevin Glick
ITS Manager
Sterling Business Forms
[EMAIL PROTECTED]


___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


RE: Mounting data CD

2004-10-20 Thread Kevin Glick
> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of 
> Steven Friedrich
> Sent: Wednesday, October 20, 2004 9:17 AM
> To: [EMAIL PROTECTED]
> Subject: Mounting data CD
> 
> I'm trying to mount a data CD as a normal user.  It works 
> fine as root, but I 
> want average users to be able to do it.
> 
> Here's the session:
> % mount_cd9660 /dev/acd0c /cdrom
> mount_cd9660: /dev/acd0c: Operation not permitted
> % mount_cd9660 /dev/acd0c /mnt
> mount_cd9660: /dev/acd0c: Operation not permitted

Normal users don't have permissions to mount to /cdrom or /mnt.
They should be able to mount in their home directory.  You might
want to look into "sudo" in the ports.  It allows users to run
commands as root.

Kevin Glick
ITS Manager
Sterling Business Forms
[EMAIL PROTECTED]


___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"