On Friday 12 July 2002 06:01 am, ic_admin wrote:
I want to mount a samba-share in my linux-box but don't want do this as root. I put an entry in my /etc/fstab like this:
"//smbserver/share /mnt smbfs username=abc,password=abc,uid=500,gid=100,rw,noauto,users,exec 0 0"
... and I am able to mount this share as root and root is not the owner of the files. BUT when I try to mount this as an user I get the error message: "cannot mount on /mnt: operation is not allowed".
Take a close look at the syntax above. You have "...noauto,users,exec 0 0" in your fstab file. That should be "...noauto,user,exec 0 0" ("user" not "users"). Try changing this and you'll probably fix your problem. Now, some of the things others have suggested may *also* need to be fixed, but this is a definite syntax error so fix it first. :-) BTW, non-root mounts do not have to have the mount point owned by the user, nor do they have to be in the user's home directory. I do user-level mounts on my system all the time with neither of these constraints. Example lines from my /etc/fstab file: # For a USB-Storage type digicam /dev/sda1 /media/camera vfat defaults,noauto,user 0 0 # For a generic IDE CDROM /dev/cdrom /media/cdrom auto ro,noauto,user,exec 0 0 The mount points in /media are owned by root:root and all have permissions of 755. I can (as a user) mount, read, write, and umount the digicam media. For the CDROM media, of course, writes are not allowed either by the hardware or by the mount option "ro". Kind regards, Scott -- -----------------------+------------------------------------------------------ Scott Courtney | "I don't mind Microsoft making money. I mind them courtney@4th.com | having a bad operating system." -- Linus Torvalds http://4th.com/ | ("The Rebel Code," NY Times, 21 February 1999) | PGP Public Key at http://4th.com/keys/courtney.pubkey