meta data for this page

This is an old revision of the document!

Back to #itlab main page

Migration to CIFS

As smbfs is unsupported and being removed from the Linux kernel (LKML: deprecate-smbfs-in-favor-of-cifs.patch) we should be migrating to using CIFS instead.

If you previously had smbfs mounts configured in fstab and you use local user database, i.e., administer your own workstation, the migration is not trivial. Most of the Samba servers here seem to support CIFS Unix extensions, meaning that mount options uid, gid, dmask, fmask, file_mode, dir_mode do not work. The UID, GID and file access permissions come from the server as is, and probably they are not the same you want to have on your workstation.

The solution is to forget fstab, and mount the shares as a normal user under your home directory using option noperms. Noperms disables local file access permissions checking, so the local UID, GID and permissions information can be whatever, they are ignored. You have to mount under your home directory to prevent other users on your workstation from using the shares you mounted. Otherwise they would have your identity and access rights on the share. So make sure only you can access the mount points.

Alternative Option

If you really want to have the same UID/GID semantics as in smbfs, do this:

echo 0 > /proc/fs/cifs/LinuxExtensionsEnabled

It disables the Unix extensions on client side.

How to Mount

The general form is:

mount.cifs share mountpoint -o noperms,user=LUT/username

For umount you must use umount.cifs command. It seems to need the absolute path to mount point, otherwise it leaves a stale entry in /etc/mtab.


Supporting Unix extensions


No Unix extensions

For these servers you may want to set mount options dir_mode=00700,file_mode=00600.



pq's cmount script

The script has server configuration inside it, and the shares come from directory structure. Here is an example directory structure: <code> .

`– ti500433

  `-- install

<\/code> Mounting works by ./cmount diso/www and umounting must be done by ./cmount -u diso/www or otherwise the mount may not be removed properly from mtab even though it is really unmounted.