problems mounting a harddisk

Rouben rouben at rouben.net
Sun Jul 22 23:14:58 UTC 2007


The best (and "proper") way to achieve rootless mounts on a given
filesystem is to add the "user" option to the fstab entry. More
details on this are available in the man page for the mount command...
Here's an excerpt from the man page of the mount command:
--- SNIP ---
Normally,  only  the superuser can mount file systems.  However, when
fstab contains the user option on a line, anybody  can  mount  the
corresponding system.

Thus, given a line
  /dev/cdrom  /cd  iso9660  ro,user,noauto,unhide
any user can mount the iso9660 file system found on his CDROM using the
command
  mount /dev/cdrom
or
  mount /cd

For more details, see fstab(5).  Only the user that mounted a  filesystem
can unmount it again.  If any user should be able to unmount, then use users
instead of user in the fstab line.
--- SNIP ---
Of course in your case, you probably don't really need this, since
this is typically used for removable devices like floppies and
CD-ROMs. I have a similar setup myself at home, actually, my home
directory is an entire hard disk partition... :) Here's my fstab
entry:

/dev/hdb1   /home/rouben   ext3   defaults   0   0

Anyway, I hope this helps clarify some things. If you really want
in-depth info on mounting stuff as non-root users for whatever reason,
I suggest reading the man pages for mount and pmount (Ubuntu uses the
latter for hotpluggable disks such as USB thumbdrives and digital
cameras).

Rouben

On 7/22/07, ubuntu-ca-request at lists.ubuntu.com
<ubuntu-ca-request at lists.ubuntu.com> wrote:
> Date: Sun, 22 Jul 2007 10:55:16 -0300
> From: "Dennis d'Entremont" <dennis.dentremont at gmail.com>
> Subject: problems mounting a harddisk
> To: "The Canadian Ubuntu Users Community" <ubuntu-ca at lists.ubuntu.com>
> Message-ID:
>         <f2c4cef60707220655l70e91deen95b09318a0be4efb at mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Hi All,
>
> I'm running Ubuntu 7.04 (64Bit) and have installed a 40GB hard drive as a
> slave (cd rom is master) on my IDE channel. My main disk is a 250GB SATA
> drive.
>
> When I run GPARTED it get an error telling me I do not have permission to
> mount the drive. I ran gparted (sudo) and was able to get the drive
> formatted but it still wouldn't mount. I was finally able to get it to mount
> from the command line (with sudo) but for some reason I can't get it to
> mount when I'm running it as a regular user.
>
> Do I need to add an entry to the fstab file for this to work properly? Any
> ideas?
>
> Thanks
> Dennis
>
> --
> Dennis d'Entremont
> IT Professional
> http://www.Nerfd.net - Nerfd Technologies
> http://www.eComStation.ca - You Canadian Source for eCS and OS/2 Software!
> http://www.SaveLoad.org - OS News and Info




More information about the ubuntu-ca mailing list