Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved]mount: must be superuser to use mount
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
regomodo
Guru
Guru


Joined: 25 Mar 2008
Posts: 445

PostPosted: Fri Jul 04, 2008 10:48 am    Post subject: [Solved]mount: must be superuser to use mount Reply with quote

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
View user's profile Send private message
lucapost
Veteran
Veteran


Joined: 24 Nov 2005
Posts: 1419
Location: <ud|me|ts> - Italy

PostPosted: Fri Jul 04, 2008 11:05 am    Post subject: Reply with quote

For example, in /etc/fstab:
Code:
/dev/mmcblk0p1        /mnt/canon                  auto     users,noauto,uid=lucapost,gid=users         0 0

_________________
LP
Back to top
View user's profile Send private message
regomodo
Guru
Guru


Joined: 25 Mar 2008
Posts: 445

PostPosted: Fri Jul 04, 2008 12:36 pm    Post subject: Reply with quote

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
View user's profile Send private message
Cyker
Veteran
Veteran


Joined: 15 Jun 2006
Posts: 1746

PostPosted: Fri Jul 04, 2008 2:28 pm    Post subject: Reply with quote

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
View user's profile Send private message
regomodo
Guru
Guru


Joined: 25 Mar 2008
Posts: 445

PostPosted: Fri Jul 04, 2008 3:14 pm    Post subject: Reply with quote

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
View user's profile Send private message
Nerevar
l33t
l33t


Joined: 31 May 2008
Posts: 720

PostPosted: Fri Jul 04, 2008 4:42 pm    Post subject: Reply with quote

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
View user's profile Send private message
regomodo
Guru
Guru


Joined: 25 Mar 2008
Posts: 445

PostPosted: Sat Jul 05, 2008 10:03 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum