Help - Search - Members - Calendar
Full Version: unmounting a 'samba file', user can't, why?
MandrivaUsers.org > Advanced Topics > Networking
seanmckinney
Just curious really as I can alway su to root and umount it. fstab contains the line

//Mk4/250G /home/sean/samba_mounts/250G smbfs noauto,user

It may be primitive but it works allowing me, as a user, to mount this but, as the same user, I cant umount it, I am just curious as to why I cant umount it?


Thanks.
ianw1974
You can try "users" as well and see if it makes a difference.
seanmckinney
QUOTE (ianw1974 @ Jun 4 2008, 07:28 AM) *
You can try "users" as well and see if it makes a difference.

Ahhh would this be the explanation http://unixhelp.ed.ac.uk/CGI/man-cgi?mount+8. It worked, thanks, I copied "user" from the settings made 'by install' for other devices.
ianw1974
Aye smile.gif

From the link:

QUOTE
For more details, see fstab(5). Only the user that mounted a filesystem can unmount it again. If any user should be able to unmount, then use users instead of user in the fstab line. The owner option is similar to the user option, with the restriction that the user must be the owner of the special file. This may be useful e.g. for /dev/fd if a login script makes the console user owner of this device. The group option is similar, with the restriction that the user must be member of the group of the special file.


so in essence, if you put users instead of user, you can then unmount it regardless of the user. If you put user, then only the user that mounted it can unmount it, in this instance, only root. If you put a group, then of course, you just need to add yourself to the group, and then you can unmount it. This is good, since you can have multiple users on the system, one can unmount it, but the other cannot unless they are a member of the group. If you are the only user, then putting users is enough to fix this problem as you've just done wink.gif
scarecrow
Either use cifs instead of smbfs (IMHO a better solution/performer), or tell samba mount to run suid root (it's not such a big security risk):
CODE
# chmod u+s /usr/bin/smbmnt
# chmod u+s /usr/bin/smbumount


Also, get sure that the mountpoint ( /home/sean/samba_mounts/250G ) permissions aren't borked, and user "sean" has at least full read/write access, if not full ownership.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.