View previous topic :: View next topic |
Author |
Message |
regomodo Guru

Joined: 25 Mar 2008 Posts: 445
|
Posted: Fri Jul 04, 2008 10:48 am Post subject: [Solved]mount: must be superuser to use mount |
|
|
I've no idea why this no longer working. I changed my fstab option for my cd-drive to "auto". This caused a problem that i would not be able to unmount it as it was mounted by ROOT. I chmod 777 /bin/mount and umount and now all matter of crap has happened. I've also chgrp cdrom mount/umount but no luck.
I can no longer use the mount/umount commands as a normal user and just the aforementioned error whenever i try to use it, as non-root.
Fstab looks like
Code: | /dev/scd0 /mnt/cdrom auto user,noauto 0 0 |
Code: | genbox jon # ls -ld /bin/mount /bin/umount
-rwxrwxrwx 1 root cdrom 60984 May 10 17:11 /bin/mount
-rwxrwxrwx 1 root root 43488 May 10 17:11 /bin/umount |
Last edited by regomodo on Sat Aug 02, 2008 2:15 pm; edited 1 time in total |
|
Back to top |
|
 |
lucapost Veteran


Joined: 24 Nov 2005 Posts: 1419 Location: <ud|me|ts> - Italy
|
Posted: Fri Jul 04, 2008 11:05 am Post subject: |
|
|
For example, in /etc/fstab:
Code: | /dev/mmcblk0p1 /mnt/canon auto users,noauto,uid=lucapost,gid=users 0 0 |
_________________ LP |
|
Back to top |
|
 |
regomodo Guru

Joined: 25 Mar 2008 Posts: 445
|
Posted: Fri Jul 04, 2008 12:36 pm Post subject: |
|
|
lucapost wrote: | For example, in /etc/fstab:
Code: | /dev/mmcblk0p1 /mnt/canon auto users,noauto,uid=lucapost,gid=users 0 0 |
|
Ok, so it looks like this now
Code: | /dev/scd0 /mnt/cdrom auto user,noauto,uid=jon,gid=users 0 0 |
But,
Code: | jon@genbox ~ $ mount /dev/scd0
mount: must be superuser to use mount |
I shouldn't need a restart right?
[EDIT]
Code: |
jon@genbox ~ $ groups
tty disk wheel uucp cron audio cdrom video cdrw usb users crontab haldaemon plugdev jon scanner vboxusers uinput |
|
|
Back to top |
|
 |
Cyker Veteran

Joined: 15 Jun 2006 Posts: 1746
|
Posted: Fri Jul 04, 2008 2:28 pm Post subject: |
|
|
Are you part of the cdrom (Or disks or whatever the right group is) group?
Also, mount/umount shouldn't be chmod 777!!! 755 is fine, but you need to make it suid root ('tho I don't generally recommend this as it can be dangerous.)
I'm still trying to figure out HAL and DBUS in KDE, which is a better way of user-mounting... it works on my Eee 900 but I've never gotten it to work properly in Gentoo! |
|
Back to top |
|
 |
regomodo Guru

Joined: 25 Mar 2008 Posts: 445
|
Posted: Fri Jul 04, 2008 3:14 pm Post subject: |
|
|
Cyker wrote: | Are you part of the cdrom (Or disks or whatever the right group is) group?
Also, mount/umount shouldn't be chmod 777!!! 755 is fine, but you need to make it suid root ('tho I don't generally recommend this as it can be dangerous.)
I'm still trying to figure out HAL and DBUS in KDE, which is a better way of user-mounting... it works on my Eee 900 but I've never gotten it to work properly in Gentoo! |
Ah, i'm not really clued up on chmod, i just copied what i found on linuxforums. I've switched it to 755 but i still get the same issue. I don't get it. USB drives mount/uNmount fine with Konqueror (but doesn't work with mount/umount commands) whilst CDroms and hdd's don't.
My previous post shows what groups i'm in. |
|
Back to top |
|
 |
Nerevar l33t


Joined: 31 May 2008 Posts: 720
|
Posted: Fri Jul 04, 2008 4:42 pm Post subject: |
|
|
I think mount and umount need to have the setuid bit set.
Code: | # ls -l /bin/mount /bin/umount
-rws--x--x 1 root root 76320 2008-06-26 11:56 /bin/mount
-rws--x--x 1 root root 30488 2008-06-26 11:56 /bin/umount
|
You should probably re-emerge sys-apps/util-linux. |
|
Back to top |
|
 |
regomodo Guru

Joined: 25 Mar 2008 Posts: 445
|
Posted: Sat Jul 05, 2008 10:03 pm Post subject: |
|
|
DarrenSmith wrote: | I think mount and umount need to have the setuid bit set.
Code: | # ls -l /bin/mount /bin/umount
-rws--x--x 1 root root 76320 2008-06-26 11:56 /bin/mount
-rws--x--x 1 root root 30488 2008-06-26 11:56 /bin/umount
|
You should probably re-emerge sys-apps/util-linux. |
cheers, that allows me to use mount once again |
|
Back to top |
|
 |
|