Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 18 Oct 2007 19:15:25 +0200
From:      Roland Smith <rsmith@xs4all.nl>
To:        Ivan Voras <ivoras@freebsd.org>
Cc:        freebsd-stable@freebsd.org
Subject:   Re: Mounting smbfs as user?
Message-ID:  <20071018171525.GA61376@slackbox.xs4all.nl>
In-Reply-To: <ff7pag$k2g$1@ger.gmane.org>
References:  <ff7pag$k2g$1@ger.gmane.org>

next in thread | previous in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
On Thu, Oct 18, 2007 at 04:08:09PM +0200, Ivan Voras wrote:
> Hi,
> 
> I'm trying to implement smbfs mounting by regular non-root users and I
> can't make any progress. vfs.usermount is set to 1.
> 
> When I try mounting a remote file system, this is what I get:
> 
> > mount_smbfs -I server //user@server/pre mt
> Warning: no cfg file(s) found.
> mount_smbfs: can not setup kernel iconv table (ISO8859-1:tolower):
> syserr = Operation not permitted
> 
> The same command works under root, and the appropriate klds are loaded:
<snip>
> Any ideas?

The user in question probably needs read/write access to the /dev/smbX
device in question.

An elagant solution is to create a group called e.g. smbusers. All the
users who need to mount an smb share should be added to this group.

Then you have to add the following rule to your /etc/devfs.rules file;

[local_ruleset=10]
add path 'smb*' mode 0660 group smbusers

The following then needs to be set in /etc/rc.conf.

devfs_system_ruleset="local_ruleset"

Then reboot or re-start devfs and try again.

Normally when mounting a drive as a normal user, the user in question
needs to _own_ the mount point. I'm not sure if this applies to smb
devices, but try it.

Roland
-- 
R.F.Smith                                   http://www.xs4all.nl/~rsmith/
[plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated]
pgp: 1A2B 477F 9970 BA3C 2914  B7CE 1277 EFB0 C321 A725 (KeyID: C321A725)

[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.4 (FreeBSD)

iD8DBQFHF5StEnfvsMMhpyURAqG+AJ9PwB9UYZxgAr5WltKDhpNiG+FDpQCfbzIL
CDxdLDW4c7fjV8cjM1Tg2Do=
=IujG
-----END PGP SIGNATURE-----

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20071018171525.GA61376>