[CCP14 Home: (Frames | No Frames)]
CCP14 Mirrors: [UK] | [CA] | [US] | [AU]

(This Webpage Page in No Frames Mode)

CCP14

Methods, Problems and Solutions

BSD UNIX Information for Crystallography

Allowing Users to Mount CD-ROMs under FreeBSD

The CCP14 Homepage is at http://www.ccp14.ac.uk

[Back to Problems and Solutions]
[Back to: BSD UNIX Information for Crystallography] [To: Linux Information for Crystallography]

FreeBSD UK User's Group - Mailing List

http://listserver.uk.freebsd.org/mailman/listinfo/freebsd-users

Date: Fri, 3 Dec 1999 00:56:51 +0000 (GMT)
From: Helen McCall [[email protected]]
Reply-To: Helen McCall [[email protected]]
Cc: [email protected]
Subject: Re: Mounting CDs

Hello Andrew,

On Thu, 2 Dec 1999, Andrew Dennis wrote:

> Is it possible to allow users who aren't in the same group as root to mount
> a CD as read only?

You want a line like the one below in your /etc/fstab:

/dev/mcd        /cdrom          iso9660 ro,user,noauto,unhide

I admit shamefacedly that I have lifted this straight from my Debian
system because it is to late at night.

You want to replace the "mcd" bit with whatever driver you are using. The
bit you are most interested in is after the "iso9660" bit. That is how to
allow user mounts read-only.

Best wishes,

Helen

 --
                                  _   _    =

                 \_/,         _ ~   ~   ~ -  _
                 |  @___oo   (                )
       /\  /\   / (___,,,}_--~  Helen McCall   ~  ) 
      ) /^\) ^\/ _)        ~__                      ~  ~  ~  -  _
      )   /^\/   _)          (_  [email protected] )
      )   _ /  / _)            (_                    _        - ~
  /\  )/\/ ||  | )_)                ~ -  ~ _     _ ~    ~ - _)
 <~~>      |(,,) )__)                         ~
  ||      /    \)___)\             =
  | \____(      )___) )___           =
   \______(_______;;; __;;;
-----------------------------------------------------------------------------

Date: Sat, 4 Dec 1999 14:35:14 +0000
From: Ben Smithurst [[email protected]]
To: Mark Ovens [[email protected]]
Cc: Helen McCall [[email protected]],
        Andrew Dennis [[email protected]],
        [email protected]
Subject: Re: Mounting CDs

Mark Ovens wrote:

[mounting CDs when uid != 0]
> Yes, and the answer's always the same - install sudo from the ports or
> get root to mount it for you.

It seems you don't need to. As root,

# chmod a+r /dev/acd0c         (or whatever CD device you use)
# sysctl -w vfs.usermount=1

and if cd9660 is not in your kernel,

# kldload cd9660

after that, any normal user can just,

ben@strontium:~$ mount_cd9660 -r /dev/acd0c ~/cdrom
ben@strontium:~$ mount
/dev/wd0s1a on / (local, writes: sync 15 async 4472)
/dev/wd0s1e on /usr (local, writes: sync 33618 async 82663)
procfs on /proc (local)
magnesium:/usr/src on /usr/src (read-only)
/dev/acd0c on /home/ben/cdrom (local, nodev, nosuid, read-only, mounted by ben)

It may be a good idea to put the three root commands in
/etc/rc.local. This seems like a cleaner solution than using sudo. Doing
the same thing for floppies may be useful for some people, too (I'm sure
you can all work out how to do that).

-- 
Ben Smithurst            | PGP: 0x99392F7D
[email protected] |   key available from keyservers and
                         |   [email protected]


[Back to Problems and Solutions]
[Back to: BSD UNIX Information for Crystallography] [To: Linux Information for Crystallography]

[CCP14 Home: (Frames | No Frames)]
CCP14 Mirrors: [UK] | [CA] | [US] | [AU]

(This Webpage Page in No Frames Mode)

If you have any queries or comments, please feel free to contact the CCP14