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 mtWarning: 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:> kldstatId Refs Address Size Name 1 15 0xc0400000 6d599c kernel 2 1 0xc0ad6000 169fc geom_raid3.ko 3 1 0xc0aed000 2464 accf_http.ko 4 1 0xc0af0000 653f4 acpi.ko 5 1 0xc0b56000 972c dummynet.ko 6 1 0xc0b60000 23c64 smbfs.ko 7 3 0xc0b84000 49f4 libiconv.ko 8 3 0xc0b89000 2c2c libmchain.ko 9 1 0xc5107000 4000 nullfs.ko 10 1 0xc5165000 1a000 linux.ko Any ideas?
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, 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:Only superuser can load modules. If you try to load module by regular user you will get: kldload: can't load xxxx.ko: Operation not permitted> >> kldstat > Id Refs Address Size Name > 1 15 0xc0400000 6d599c kernel > 2 1 0xc0ad6000 169fc geom_raid3.ko > 3 1 0xc0aed000 2464 accf_http.ko > 4 1 0xc0af0000 653f4 acpi.ko > 5 1 0xc0b56000 972c dummynet.ko > 6 1 0xc0b60000 23c64 smbfs.ko > 7 3 0xc0b84000 49f4 libiconv.ko > 8 3 0xc0b89000 2c2c libmchain.ko > 9 1 0xc5107000 4000 nullfs.ko > 10 1 0xc5165000 1a000 linux.ko > > Any ideas? > > _______________________________________________ > freebsd-stable@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-stable > To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org" >-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) iD8DBQFHF2sDxJBWvpalMpkRAkoDAJ4vnIc8qx7cxdtBvirv/5y5E+UTPwCfTIlG oYuiOLhWpiX198tgfOSBrsE=uth8 -----END PGP SIGNATURE-----
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) -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 187 bytes Desc: not available Url : http://lists.freebsd.org/pipermail/freebsd-stable/attachments/20071018/43bc5625/attachment.pgp
on 18/10/2007 17:29 Ivan Voras said the following:> Krassimir Slavchev wrote: >> Hi, >> >> Ivan Voras wrote: > > >>> The same command works under root, and the appropriate klds are loaded: >> Only superuser can load modules. If you try to load module by regular >> user you will get: kldload: can't load xxxx.ko: Operation not permitted > > > To clarify: the modules were loaded before I tried either as user or as > root. >This doesn't seem to be entirely smbfs-specific, but rather specific to internal workings of iconv modules. Here's some information from a while ago: http://lists.freebsd.org/pipermail/freebsd-stable/2006-December/031501.html I didn't get any useful information since then and still have to use a workaround of doing any mount as root to get iconv initialized first and then all subsequent user mounts are successful. While on one hand this seems like only a minor annoyance, on the other hand it indicates a problem in iconv internal workings and this should be considered a bug as this breaks a user-mount feature. Probably a PR is due here, I was just too lazy to open it when I first hit the problem. -- Andriy Gapon
On 18/10/2007, Roland Smith <rsmith@xs4all.nl> wrote:> The user in question probably needs read/write access to the /dev/smbX > device in question.There is no such device: # ls /dev/smb* ls: No match. (with and without a smbfs mount point mounted by root)