Problem: With Roaming Profiles Users Can not Access Files

Problem

When using roaming profiles Windows users sometimes can not access their files or get “permission denied”. Especially Firefox shows this behaviour.

Environment

Users logging in in parallel on two or more computers or are not logging off correctly or are loosing network connectivity while being logged in.
This can happen with folder redirections, too.
Root cause is file locking implemented by Samba to prevent simultaneous write access to files.

Solution

Disable locks for Samba or just for the affected shares. This will implement a little performance degrade as clients now have to make sure a write on a file has been performed and are not able to cache the content of a remote file locally.

Disable locks for Samba globally:

ucr set samba/oplocks=no
/etc/init.d/samba restart

Disable per share (ie SHARENAME):
Crerate a file named /etc/samba/local.conf (or modify existing file) and add the following lines:

[SHARENAME]
oplocks=no

Restart Samba:
/etc/init.d/samba restart

Mastodon