# mount_msdosfs: msdosfs_iconv: Operation not permitted



## tankist02 (Jan 9, 2013)

I am trying to mount a FAT32 drive with Russian file names:


```
mount_msdosfs -L en_US.UTF-8 -D UTF-8 -o large /dev/da0s1 ~/mnt/usb
mount_msdosfs: msdosfs_iconv: Operation not permitted
```

But I already have msdosfs_iconv.ko loaded:


```
kldstat|grep msdos
12    1 0xffffffff815b7000 11e0     msdosfs_iconv.ko
```

and regular user can mount:


```
sysctl vfs.usermount
vfs.usermount: 1
```


What's interesting if I mount/umount once as root:


```
sudo mount_msdosfs -L en_US.UTF-8 -D UTF-8 -o large /dev/da0s1 ~/mnt/usb
sudo umount ~/mnt/usb
```

then I can successfully mount/umount as a regular user without getting the error in the title.

My system:


```
uname -a
FreeBSD obama-fbsd 9.1-RELEASE FreeBSD 9.1-RELEASE #0 r243825: Tue Dec  4 09:23:10 UTC 2012     root@farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  amd64
```

What am I missing in my configuration?


----------



## wblock@ (Jan 9, 2013)

Check kldstat(8) before and after running as root.  I'd guess mount(8) needs to load that kernel module, but a normal user is not allowed to do that.


----------



## tankist02 (Jan 9, 2013)

The msdosfs_iconv module is loaded during boot:


```
grep msdosfs_iconv /boot/loader.conf
msdosfs_iconv_load="YES"
```

Just to be sure I ran kldstat before and after 'sudo mount...' - no differences.


----------



## Beastie (Nov 29, 2015)

I'm reviving this old thread because I have the same problem. In my case it started with a directory with non-foreign "invalid characters". The directory is displayed normally on Windows but is not even visible on FreeBSD. Only ls() sees it but throws errors.

I've tried every solution I've found on the Internet to no avail, including using misc/mc, converters/convmv, sysutils/rename, etc. But this is another topic.

Finally I was able to make iconv work, but in a weird way.

First you have to mount as root: `mount_msdosfs -L en_US.UTF-8 -D UTF-8 /dev/<device> /mountpoint`

You can unmount the device now: `umount /mountpoint`

Then you run the first command again but as a normal user and it works fine this time: `mount_msdosfs -L en_US.UTF-8 -D UTF-8 /dev/<device> /mountpoint`

What's even weirder is that at any time, if you unload msdosfs_iconv.ko and load it again, nothing works anymore. Only running the `mount_msdosfs` command as root first makes it work properly.


----------



## Juha Nurmela (Nov 29, 2015)

The error message is... _funny_. It's not directly about the kld, but instead something went wrong when `mount_msdosfs` tried to configure the charset translations. Maybe some language-file in the depths of /usr/share has root-only permissions.

Juha

who would gladly give up å, ä and ö.


----------

