Mombu the GNU Linux Forum sponsored links

Go Back   Mombu the GNU Linux Forum > GNU_Linux > samba and fstab
User Name
Password
REGISTER NOW! Mark Forums Read

sponsored links


Reply
 
1 4th May 17:51
ryan w sims
External User
 
Posts: 1
Default samba and fstab



I'm trying to set up a samba share in fstab so that I can mount/unmount
it as a user, specifically with the KDE Devices applet. I have my CDROM
set up like that, to mount to /mnt/cdrom

fstab:
/dev/cdroms/cdrom0 /mnt/cdrom iso9660 noauto,ro,users 0 0

Here's what I had for the samba share:

//server/share /mnt/samba smbfs rw,users,username=guest,passwd=, 0 0

both /mnt/samba and /mnt/cdrom have the same permissions/ownership.

when I issue "mount /mnt/samba" as root, no problem. But as a user, I
get a permission denied error.

I checked man mount under the smbfs options, and it was singularly
unhelpful. Also, in the forums, people seemed to be divided between
"that should work" and "this doesn't work."

The fix I have right now is that I changed the mount point to the user's
home directory. It works, since it's a single-user machine, but it
seems like a kludgey solution.

--
Be the person your dog thinks you are.

--
gentoo-user@gentoo.org mailing list
  Reply With Quote


  sponsored links


2 4th May 17:52
mike williams
External User
 
Posts: 1
Default samba and fstab



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

It's 'user', not 'users'.

I also use a credentials file, which is simple a 2 line file with:
username = user
password = pass

//svr/share /mnt/samba smbfs noauto,credentials=/home/user/.cred,user 0 0

- --
Mike Williams

--
gentoo-user@gentoo.org mailing list
  Reply With Quote
3 4th May 17:52
calvin walton
External User
 
Posts: 1
Default samba and fstab


Actually, 'users' is a valid option. the difference between it and
'user' is that with 'user' only the user that mounted the filesystem
can unmount it. With 'users' any user can unmount the filesystem.

--
Calvin Walton

--
gentoo-user@gentoo.org mailing list
  Reply With Quote
4 4th May 17:52
marc redmann
External User
 
Posts: 1
Default samba and fstab


you don't need to put your samba share in fstab to be able to mount it as a
normal user, you can just use "smbmount //path_to/share /where_to/mount",
which can be executed by any normal user.

brgds, Marc

--
gentoo-user@gentoo.org mailing list
  Reply With Quote
5 5th May 04:01
holly bostick
External User
 
Posts: 1
Default samba and fstab


Yes, it should work as root--- but unless you have given write
permissions to the user for that *mount point*, naturally it won't work
for the user. The 'permission denied' error is the key, as is the below
further note that the user can mount the share to the users ${HOME}$.

About the only and main relevant difference between /mnt/samba and
/home/username/whatever is that the owner of the ${HOME}$ mount point 1)
is the user 2) automatically has write permissions to the mount point
folder (because the owner always does), whereas the user does not
necessarily have write permissions to a folder created in /mnt. And you
need write permission to mount files into a folder (just as you need
them to delete files from a folder).


Not really more of one than hacking the permissions of a folder in /mnt
to give the user permission to write to it. Plus, ${HOME}$ is closer in
your file manager, even if your fm is the term.

But it's your choice.

Hope this helps.

Holly

--
gentoo-user@gentoo.org mailing list
  Reply With Quote
6 5th May 13:34
mike williams
External User
 
Posts: 1
Default samba and fstab


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hey, cool.
You learn something new every day, cheers.

- --
Mike Williams
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.9.10 (GNU/Linux)

iD8DBQFBT/yEInuLMrk7bIwRAlulAJ9HZVB9unQEXY7YTflzRDNr4z/jyQCfeOZZ
GMwIxfI2SPWrCcQlndhyopM=
=8QLa
-----END PGP SIGNATURE-----

--
gentoo-user@gentoo.org mailing list
  Reply With Quote
7 6th May 18:34
ryan w sims
External User
 
Posts: 1
Default samba and fstab


I don't mean to be argumentative, but...if I need write access to mount
something to a given mount point, why does it work with /mnt/cdrom?
That directory is owned by root, and has permissions 700, the same with
/mnt/samba.


--
Be the person your dog thinks you are.

--
gentoo-user@gentoo.org mailing list
  Reply With Quote
8 6th May 18:34
holly bostick
External User
 
Posts: 1
Default samba and fstab


Sorry I was not completely clear. What I meant was that, when you
remove/delete files, you are writing to the directory, just as you are
when you add files. So you need write permission to change the contents
of the directory, as well as to delete the files themselves.

Now, as for /mnt/cdrom, that may suggest that mount is a special case
(clearly some special permissions are needed, hence the "user(s)"
option), or it suggests that root is mounting the drive, and that you
are running as root, because permissions of 700 on the mount point
wouldn't let anyone but root even so much as read the contents of the
folder-- so when you say "it works with /mnt/cdrom", it's hard to know
what exactly you mean.

Anyway, it's late for me and I'm off to bed. I'll be clearer-spoken
tomorrow if we're still wanting to talk about this ;-) .

Holly


--
gentoo-user@gentoo.org mailing list
  Reply With Quote
Reply


Thread Tools
Display Modes




Copyright © 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666