Bug 6930 - problem opening file after creation
problem opening file after creation
Status: NEW
Product: Samba 3.4
Classification: Unclassified
Component: File services
Other Linux
: P3 normal
: ---
Assigned To: Volker Lendecke
Samba QA Contact
Depends on:
  Show dependency treegraph
Reported: 2009-11-25 08:17 UTC by Jeff Layton
Modified: 2009-11-27 16:43 UTC (History)
0 users

See Also:

bzip2'ed wire capture of test (5.20 KB, application/octet-stream)
2009-11-25 08:21 UTC, Jeff Layton
no flags Details
samba debuglevel 10 log during test (165.36 KB, text/plain)
2009-11-25 08:23 UTC, Jeff Layton
no flags Details
smb.conf from server (776 bytes, text/plain)
2009-11-27 16:43 UTC, Jeff Layton
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jeff Layton 2009-11-25 08:17:48 UTC
I noticed in testing today that the connectathon tests were failing on Linux cifs when run against samba 3.4.2 when I mount it with -o nounix.

In particular, the small compile test fails. I've been able to narrow it down to a simple compile of a file on the cifs share using:

# gcc -o stat stat.c -lm

The same test works fine against windows.

The file "stat" appears to be created, but subsequent attempts to open it fail. I haven't tested in a while, but I believe this was working at some point in the past.
Comment 1 Jeff Layton 2009-11-25 08:21:20 UTC
Created attachment 5008 [details]
bzip2'ed wire capture of test

File is created in frame 51

Open attempt with disposition of OPEN in frame 58 fails. I think this is expected.

Open attempt with disposition of OVERWRITE_IF in frame 65 fails. I think this should succeed.
Comment 2 Jeff Layton 2009-11-25 08:23:05 UTC
Created attachment 5009 [details]
samba debuglevel 10 log during test
Comment 3 Jeff Layton 2009-11-25 08:23:48 UTC
The samba package is the one shipped with Fedora 12:

$ smbd --version
Version 3.4.2-47.fc12
Comment 4 Jeremy Allison 2009-11-25 17:22:13 UTC
Ok, when I try to reproduce this on master with a compile of some junk code I get:

gcc -o lentest lentest.c
/usr/bin/ld: reopening lentest: Permission denied

/usr/bin/ld: final link failed: Permission denied
collect2: ld returned 1 exit status

Is this what you get ?

But looking at the Samba log and the wireshark trace I don't see any NT_STATUS_ACCESS_DENIED errors.

I see them in your log, but can't see the cause. What are the settings on your share ? The "create mask" settings might matter here (although the owner should always have full access).

Comment 5 Jeff Layton 2009-11-27 16:43:32 UTC
Created attachment 5020 [details]
smb.conf from server

Here's the smb.conf from the server. The share I mounted was 'scratch' and it was mounted anonymously:

Permissions on /export/scratch are:

drwxrwxrwt. 8 root root 4096 2009-11-25 07:28 /export/scratch/

Not exactly sure what the ownership on the file being built ends up being since it's eventually deleted, but everything else in there is owned by "nobody:nobody". I expect that it would be the same.