[Samba] Permission error on /etc/samba/private/secrets.tdb

2004-07-13 Thread Heinrich Rebehn
Hi list,
I have a strange permission problem with secrets.tdb on an nfs mounted 
filesystem.
A strace of smbd shows the following lines:


open(/etc/samba/private/secrets.tdb, O_RDWR|O_CREAT|O_LARGEFILE, 0600) 
= 4 

fcntl64(4, F_SETLKW64, {type=F_WRLCK, whence=SEEK_SET, start=0, len=1}, 
0xb010) = -1 EACCES (Permission denied) 


/etc/samba/private/secrets.tdb is a link to 
/var/etc/samba/private/secrets.tdb which in turn is a link to 
/cluster/bremerhaven/secrets.tdb, which is on an nfs mounted filesystem.

This setup is because the root fs is readonly and /var is volatile (tmpfs).
root has full access on /cluster and it also does not help if i set 
secrets.tdb's permissions to 0666.

Are there known issues with the fcntl64 call? Would upgrading to kernel 
2.6.x help?

Versions:
--
smbd: 3.0.4
kernel: 2.4.26
NFS server: FreeBSD 5.2.1
Any help or hints would be appreciated.
Grretings,
Heinrich Rebehn
University of Bremen
Physics / Electrical and Electronics Engineering
- Department of Telecommunications -
Phone : +49/421/218-4664
Fax   :-3341
--
To unsubscribe from this list go to the following URL and read the
instructions:  http://lists.samba.org/mailman/listinfo/samba


Re: [Samba] Permission error on /etc/samba/private/secrets.tdb

2004-07-13 Thread Jeremy Allison
On Tue, Jul 13, 2004 at 11:16:23AM +0200, Heinrich Rebehn wrote:
 Hi list,
 
 I have a strange permission problem with secrets.tdb on an nfs mounted 
 filesystem.
 A strace of smbd shows the following lines:
 
 
 open(/etc/samba/private/secrets.tdb, O_RDWR|O_CREAT|O_LARGEFILE, 0600) 
 = 4 
 
 fcntl64(4, F_SETLKW64, {type=F_WRLCK, whence=SEEK_SET, start=0, len=1}, 
 0xb010) = -1 EACCES (Permission denied) 
 
 
 
 /etc/samba/private/secrets.tdb is a link to 
 /var/etc/samba/private/secrets.tdb which in turn is a link to 
 /cluster/bremerhaven/secrets.tdb, which is on an nfs mounted filesystem.
 
 This setup is because the root fs is readonly and /var is volatile (tmpfs).
 
 root has full access on /cluster and it also does not help if i set 
 secrets.tdb's permissions to 0666.
 
 Are there known issues with the fcntl64 call? Would upgrading to kernel 
 2.6.x help?

Try not to put tdb files on an nfs mount. Some servers (Solaris as I
remember) have issues with doing fcntl locks on an mmapped file. By
issues I mean it doesn't work :-).

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


Re: [Samba] Permission error on /etc/samba/private/secrets.tdb

2004-07-13 Thread Heinrich Rebehn
Jeremy Allison wrote:
On Tue, Jul 13, 2004 at 11:16:23AM +0200, Heinrich Rebehn wrote:
Hi list,
I have a strange permission problem with secrets.tdb on an nfs mounted 
filesystem.
A strace of smbd shows the following lines:


open(/etc/samba/private/secrets.tdb, O_RDWR|O_CREAT|O_LARGEFILE, 0600) 
= 4 

fcntl64(4, F_SETLKW64, {type=F_WRLCK, whence=SEEK_SET, start=0, len=1}, 
0xb010) = -1 EACCES (Permission denied) 


/etc/samba/private/secrets.tdb is a link to 
/var/etc/samba/private/secrets.tdb which in turn is a link to 
/cluster/bremerhaven/secrets.tdb, which is on an nfs mounted filesystem.

This setup is because the root fs is readonly and /var is volatile (tmpfs).
root has full access on /cluster and it also does not help if i set 
secrets.tdb's permissions to 0666.

Are there known issues with the fcntl64 call? Would upgrading to kernel 
2.6.x help?

Try not to put tdb files on an nfs mount. Some servers (Solaris as I
remember) have issues with doing fcntl locks on an mmapped file. By
issues I mean it doesn't work :-).
Jeremy.
Thanks for your reply.
Unfortunately i do not have any other option on a diskless machine. I 
could copy it to tmpfs at boot time, but that would require copying it 
back on shutdown.
The good news, however, is that it works with kernel 2.6.7, so maybe 
it's not a server's problem but a linux problem (or both).
Yet smbd still complains that it can't set permission 0600 on 
secrets.tdb which still does not make sense.
Anyhow, samba does work now.

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