Re: cant i mount fixed drive with write access??
Hi,
Thanks for the response..
On 10/12/07, Jörg-Volker Peetz <peetz@scai.fraunhofer.de> wrote:
> P Kapat wrote:
> > Hi,
> >
> > I have been banging my head for quite a few hours now. Can't I mount a
> > fixed (internal SATA) drive with write access as a normal user? Here
> > is the relevant line from fstab:
> >
> > /dev/sdb1 /media/backup ext3 user,noauto,rw 0 0
> >
> > $ ls -l /media/backup
> > drwxrwxrwx 3 root root 4096 2007-10-12 03:12 /media/backup
> >
> > $ mount /dev/sdb1
> > $ ls -l /media/backup
> > drwxr-xr-x 3 root root 4096 2007-10-12 03:12 /media/backup
> >
> > Why am I loosing the write access??
> >
>
> Maybe, it's because the directory /media/backup is owned by root?
Yes, that is true and is evident from the ls outputs above! But I am
trying to mount it as a user (with rw option)!
> In order to allow mounting for normal users, I suggest the package pmount.
I use pmount for USB drives. I read man pmount a few more times!
Here's the POLICY section:
The mount will succeed if all of the following conditions are met:
· device is a block device in /dev/
· device is not in /etc/fstab (if it is, pmount executes mount
device as the calling user to handle this transparently)
· device is not already mounted according to /etc/mtab and /proc/mounts
· if the mount point already exists, there is no device already
mounted at it and the directory is empty
· device is removable (USB, FireWire, or MMC device, or
/sys/block/drive/removable is 1) or whitelisted in /etc/pmount.allow.
· device is not locked
Notice that this works ONLY for devices not in fstab and REMOVABLE
unless "whitelisted in /etc/pmount.allow". In my case, the disk is
internal, hence NOT removable. Removing the relevant line from fstab
and adding the device to /etc/pmount.allow makes the device
"mountable" to pmount, but the mount works exactly the same way as
mount! That is, the mount point is owned by root and as a user I have
no 'write access'!
> --
> Regards,
> Jörg-Volker.
--
Regards
PK
--------------------------------------
http://counter.li.org #402424
Reply to: