Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
umount: only root can unmount
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
blixel
Guru
Guru


Joined: 19 Jul 2004
Posts: 403
Location: Central, Florida

PostPosted: Thu Sep 09, 2004 7:10 am    Post subject: umount: only root can unmount Reply with quote

It took me a little while, but I finally have my /etc/fstab setup where I'm able to mount my share as an ordinary user. Here is the line in my /etc/fstab

Code:
//192.168.1.77/david    /home/david/storage    smbfs    user,uid=david,gid=david,rw,credentials=/etc/samba/stuff.credentials    0 0


/etc/samba/stuff.credentials has 600 permissions and is owned by david:david

Now when I type "mount /home/david/storage", my share is mounted and all is good. But when I type "umount /home/david/storage", I get this notice:

Code:
umount: only root can unmount //192.168.1.77/david from /home/david/storage


In my /etc/fstab, I changed "user" to "users" and it works, but that seems incorrect to me. I think it should be "user".

So my question is: Should it be "user" or "users"? If "users", why? And if "user", how do I make it where I can umount as my normal user?
Back to top
View user's profile Send private message
Minox
Apprentice
Apprentice


Joined: 12 Apr 2004
Posts: 188
Location: Germany / Munich

PostPosted: Thu Sep 09, 2004 7:16 am    Post subject: Reply with quote

Hi,
better to read the manpage (man mount):

Code:
              user   Allow an ordinary user to mount  the  file  system.   The
                     name  of  the mounting user is written to mtab so that he
                     can unmount the file system again.  This  option  implies
                     the  options noexec, nosuid, and nodev (unless overridden
                     by  subsequent   options,   as   in   the   option   line
                     user,exec,dev,suid).

              users  Allow  every  user  to mount and unmount the file system.
                     This option implies the options noexec, nosuid, and nodev
                     (unless  overridden  by  subsequent  options,  as  in the
                     option line users,exec,dev,suid).


So, good luck.
_________________
:!: proud to be 100% M$ free :!:
Back to top
View user's profile Send private message
blixel
Guru
Guru


Joined: 19 Jul 2004
Posts: 403
Location: Central, Florida

PostPosted: Thu Sep 09, 2004 8:50 am    Post subject: Reply with quote

Minox wrote:
Hi,
better to read the manpage (man mount):

Code:
              user   Allow an ordinary user to mount  the  file  system.   The
                     name  of  the mounting user is written to mtab so that he
                     can unmount the file system again.  This  option  implies
                     the  options noexec, nosuid, and nodev (unless overridden
                     by  subsequent   options,   as   in   the   option   line
                     user,exec,dev,suid).

              users  Allow  every  user  to mount and unmount the file system.
                     This option implies the options noexec, nosuid, and nodev
                     (unless  overridden  by  subsequent  options,  as  in the
                     option line users,exec,dev,suid).


So, good luck.


According to the man page, if I use the "user" option, I should be able to unmount as well as mount. I can't. And that was the basis of my question. So I don't really see the relevance of your reply.
Back to top
View user's profile Send private message
Minox
Apprentice
Apprentice


Joined: 12 Apr 2004
Posts: 188
Location: Germany / Munich

PostPosted: Thu Sep 09, 2004 9:22 am    Post subject: Reply with quote

Sorry,
was my fault. I haven't read it exactly enough. Ok so you are right. The user david should be able to umount the deivce.
Dunno.
_________________
:!: proud to be 100% M$ free :!:
Back to top
View user's profile Send private message
labyrinth
Apprentice
Apprentice


Joined: 03 Oct 2004
Posts: 158

PostPosted: Sun Nov 28, 2004 1:57 am    Post subject: Reply with quote

Hmm...

I had the same problem, and switching it from 'user' to 'users' instantly worked.

This thread's a few months old, but it makes me curious... Why would you want to give permission for only mounting? Or why isn't there another keywored (possibly 'use'--subtracting a letter ;) that would make it so you could umount but not mount? I also agree that the man page makes it sound a bit like 'user' should work as well...

Just curious, if anyone knows the reasoning behind the way it's set up.
Back to top
View user's profile Send private message
blixel
Guru
Guru


Joined: 19 Jul 2004
Posts: 403
Location: Central, Florida

PostPosted: Sun Nov 28, 2004 2:03 am    Post subject: Reply with quote

labyrinth wrote:
Hmm...

I had the same problem, and switching it from 'user' to 'users' instantly worked.

This thread's a few months old, but it makes me curious... Why would you want to give permission for only mounting?


My concern with using 'users' instead of 'user' was that anyone could mount or unmount my share. I want to be able to mount and unmount it as my own user, but I don't want any other user (other than root obviously) to be able to mount or unmount the share I have specified.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security 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