TroubleShooting_Mounting

Alexander Reinholdt

Problem

After mounting, the share is only shown for a few seconds and then vanishes. No error message is being displayed.

This problem only affects Smb4K, version < 1.0.0, under Linux.

Solution

This issues arises sometimes if you are not allowed to mount the shares as normal user. To solve this problem, you can either enable the use of sudo in the Super User configuration page or set the SUID root bit for the mount binary:

$ chmod +s `which mount.cifs`

If you decide to use the latter solution, do not forget to also set the SUID root bit for umount.cifs, if it exists.

With the introduction of the cifs-utils package (Linux only), umount.cifs was removed. In case umount.cifs is missing on your system, you should use the sudo method.

Do not set the SUID root bit for the umount binary!


Problem

Mounting fails with the following error message:

mount error 1 = Operation not permitted
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

This problem only affects Smb4K, version < 1.0.0, under Linux.

Solution

You are not permitted to use mount.cifs as normal user. To solve this problem, you can either enable the use of sudo in the Super User configuration page or set the SUID root bit for the mount binary:

$ chmod +s `which mount.cifs`

If you decide to use the latter solution, do not forget to also set the SUID root bit for umount.cifs, if it exists.

With the introduction of the cifs-utils package (Linux only), umount.cifs was removed. In case umount.cifs is missing on your system, you should use sudo.

Do not set the SUID root bit for the umount binary!

It has also been reported that mount.cifs might fail if the Samba server uses the

security = share

option in the smb.conf file instead of

security = user

Change the settings on the server if the above approach did not solve your problem.


Problem

When using sudo, mounting fails with the following error message:

mount error 13 = Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

This problem only affects Smb4K, version < 1.0.0, under Linux.

Solution

Possibly the 'env_reset' flag has been set in the /etc/sudoers file (It's the default in Gentoo and Debian for example.). It resets the environment to only contain a limited number of environment variables. Especially, the PASSWD variable is removed that is needed by Smb4K. You can fix this problem by alternatively doing the following:

  • Manually insert the following line after the statement beginning with "User_Alias SMB4KUSERS":

    Defaults:SMB4KUSERS env_keep=PASSWD
    

    This is the preferred method on a multi-user system.

  • Remove the Smb4K user entries from /etc/sudoers and rewrite them using Smb4K.

  • Comment out the 'env_reset' variable (NOT recommended).

If you are still not able to mount a share, please file a bug report.


Problem

Mounting a share fails with the following error message:

mount_smbfs: kldload(smbfs): Operation not permitted

This problem only affects Smb4K, version < 1.0.0, under FreeBSD.

Solution

The error occurs, because only root is allowed to load kernel modules. So, you should enable the usage of sudo in the Super User configuration page to gain super user privileges for mounting.


Problem

Mounting a share fails with the following error message:

mount_smbfs: cannot setup kernel iconv table (ISO8859-1:tolower): 
syserr = Operation not permitted

Solution

This error occurs when you switch off sudo support during program run. Since only root is allowed to set up the kernel's iconv table, you have to use sudo to gain super user privileges for mounting.
Re-enable it in the Super User configuration page.


Problem

Smb4K does not seem to care about the UID and GID that was set in the configuration dialog.

This problem only affects Smb4K under Linux.

Solution

This is a Samba feature. If the target server supports the CIFS Unix extensions, the uid=UID and gid=GID options are ignored. For more information see the mount.cifs(8) manual page.


Related

Wiki: Home