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

Re: only root can unmount



On Sun, 30 Nov 2008 23:11:29 +0100, Sven Joachim wrote:

>>> The only thing that sticks out is that you have /dev/dvd in fstab but
>>> mount talks about /dev/scd2. Try replacing /dev/dvd with /dev/scd2 in
>>> fstab.
>>
>> Ah, it works now. Thanks a lot Andrei. That's the solution.
> 
> Hm, I still do not quite understand why this solves the problem. Because
> I have this in /etc/fstab:
> 
> /dev/cdrom	/media/cdrom	iso9660	ro,user,noauto	0	0
> 
> and I can umount discs that I mounted as user just fine.

Ahhhh! Thanks a lot for the comment Sven. I find the real reason:

tong@helios:~$ grep dvd /etc/fstab
/dev/dvd       /media/dvd       auto    users,noauto,exec,ro    0      0
/dev/dvd /mnt/dvd auto user,noauto,exec,ro 0 0

tong@helios:~$ mount /media/dvd

tong@helios:~$ umount /media/dvd && echo ok
ok

tong@helios:~$ mount /mnt/dvd

tong@helios:~$ umount /mnt/dvd
umount: only root can unmount /dev/dvd from /mnt/dvd

I.e., the trick is not actually the name-du-jour of the DVD drive, but 
the mount point -- under /mnt, no; under /media yes.

-- 
Tong (remove underscore(s) to reply)
  http://xpt.sourceforge.net/techdocs/
  http://xpt.sourceforge.net/tools/


Reply to: