[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: cant i mount fixed drive with write access??



On Friday 12 October 2007 00:32, P Kapat wrote:
> 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??

You are (probably) not losing the write access, as a cat
of /proc/mounts will (probably) show you.

Before the mount /media/backup (probably) refers to the
/media/backup directory of the root filesystem.  After the
mount /media/backup refers to the root directory of the
/dev/sdb1 filesystem.

Although you (probably) have write access to the /dev/sdb1
partition, you do not have write access to the root directory
of the /dev/sdb1 filesystem.  You may or may not have write
access to other directories or files in the /dev/sdb1
filesystem.  It is similar to the way that user foo typically
has no write access to the / directory but does have write
access to the /home/foo directory.

A first step would be, after the mount, to either chmod or
chown /media/backup (or both).  Like any other change to the
/dev/sdb1 filesystem, this is stored in the filesystem.  If
you umount and mount the filesystem the change will still be
there, so the change only ever needs to be done once.

--Mike Bird



Reply to: