Re: [Samba] locks directory over nfs

2004-02-26 Thread Gerald (Jerry) Carter
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Alon Shalita wrote:
| Hello.
|
| In our samba configuration, the lock directory is located
| on an NFS mount. It seems that for some reason this
| causes many problems:
We don't support storing the lock directory on an NFS mount.





cheers, jerry
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.1 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFAPhdIIR7qMdg1EfYRAtFLAJ9dJPSlUAXDu/VR4AoxsJK5jZCwiwCgwpVd
aR82kd4YkgQ0K6nSwix4Wgw=
=YYgN
-END PGP SIGNATURE-
--
To unsubscribe from this list go to the following URL and read the
instructions:  http://lists.samba.org/mailman/listinfo/samba


[Samba] locks directory over nfs

2004-02-26 Thread Alon Shalita
Hello.

In our samba configuration, the lock directory is located on an NFS mount.
It seems that for some reason this causes many problems:
Some applications fail to save files properly (eg matlab), some applications
fail to print (eg acrobat reader), and each time those application fail,
we got a message on the log saying

[2004/02/16 10:19:35, 0] tdb/tdbutil.c:tdb_log(724)
  tdb(/usr/local/lib/samba-3.0.1/var/locks/locking.tdb): expand_file ftruncate to 8192 
failed (Permission denied)

(for file problems)

and

[2004/02/19 15:42:23, 0] tdb/tdbutil.c:tdb_log(724)
  tdb(/usr/local/lib/samba-3.0.1/var/locks/printing/hpcs.tdb): expand_file ftruncate 
to 73728 failed (Permission denied)

(for the print problem).

The premission on those files are 755, with owner of root (the server
runs as root). The nfs server where the files are located premit root
to accesss files as root (has no_root_squash).

When tring exactly the same configuration on a local disk (I just copied
the locking directory to a local direcotry, and did mount --bind) -
no errors on the log, and all operations go well.

After doing some strace on the code, we saw the smbd is trying to change
the locking.tdb file when running in user permissions. Our guess is that
the server opens the file when running as root, switch to the calling
user (setuid) and then accesses the file again. This works fine with a
local disk but not with NFS where permissions are checked on every access.

We saw this behavior on samba 3.0.1 and 3.0.2a, on i386 linux machine.

Is it a bug in samba ? 

Thanks,
Alon
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  http://lists.samba.org/mailman/listinfo/samba