Bug 5685 - Fail to append to a writable only file in ver 3 and above (ver 2 OK)
Summary: Fail to append to a writable only file in ver 3 and above (ver 2 OK)
Status: RESOLVED WORKSFORME
Alias: None
Product: Samba 3.2
Classification: Unclassified
Component: File services (show other bugs)
Version: 3.2.0
Hardware: All AIX
: P3 regression
Target Milestone: ---
Assignee: Jeremy Allison
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-08-12 08:07 UTC by Mohamed Bouherrou (dead mail accunt)
Modified: 2023-01-07 11:56 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mohamed Bouherrou (dead mail accunt) 2008-08-12 08:07:03 UTC
In the current working setup, we have Samba 2.2.8 running on a AIX 5.3 server.
Most of the data shared over Samba is mounted over NFS from a FileServer (Solaris). Note here that we have ACLs set at the FileServer side.
One of the files have rwxrwx-wx permissions which allow anyone to append data to it (tested from Windows using the cmd: echo "test" >> \\smbserver\share\testfile).

I'm trying to migrate to Samba 3 (3.0 or 3.2), however I'm having two issues:
- 1st the append mode doesn't work anymore and the above command return "Permission denied"!
  Further analysis of the logs shows that ver 2.2.8 fails to open the file for RW and than does the open for write only!. In ver 3.0 and 3.2, it does only the try for RW mode and fails!
  + Why is this difference between the two versions (2 vs. 3)?
  + Is this a normal behaivor? or is there a way to set some parameters to allow the append mode?
PS. Note here that at the Unix OS level, everyone can append to the file.

- 2nd issue is related to ACLs as it seems that they are taken into account in ver 2.2.8 but not in 3.0 and 3.2.

In general, looks for me like, starting from ver 3, Samba is handling some extra verifications and not allowing the OS itself to check for the user's real permissions! Is this true somehow? Is there a way to force Samba to use the real OS permissions?

Thanks
Comment 1 Mario Zuzarte 2008-12-02 08:49:35 UTC
(In reply to comment #0)

I'm having trouble too.

I have folders on server with permissions like rwxrws-wx and was working fine.
When I try to update to samba 3.2.5 on debian Lenny, I cannot write to that folders anymore.

Nothing new?



Comment 2 Guenther Deschner 2009-08-06 08:50:40 UTC
Jeremy, any idea what is going on here ?
Comment 3 Jeremy Allison 2009-08-06 15:39:53 UTC
If a client only requests WRITE_DATA on an NTCreateX open we correctly map this to O_WRONLY, so this should work in the latest 3.2.13 and above. Volker added a fix to allow smbd to traverse directories with no permissions granted for read (dropboxes) recently, not sure what version that went into but it might also be needed.
Please upgrade to a recent 3.2, 3.3 or 3.4 and re-test.
Jeremy.
Comment 4 Mohamed Bouherrou (dead mail accunt) 2009-08-14 14:11:57 UTC
(In reply to comment #3)

Sorry the issue is still there!

First I have to mention that my second reported issue related to ACLs can be fixed by setting the "acl check permissions" to NO in the conf file.

For the first issue related to appending to a writable only file, I did the testing again on Samba 3.4.0, 3.3.7.0 and 3.2.13.0 on a file owned by myself with 300 permissions and tried to append a line to it using Windows command prompt without success. I also tried to open it in an append mode using TCL without success too.

Please note here that I'm unstalling the PWARE binary distributions for AIX (http://pware.hvcc.edu/download/aix53/).
Comment 5 Björn Jacke 2023-01-07 11:56:47 UTC
quite old bug and not enough details. I also do not see any issues in that area. I suggest you contact one of the companies listed at https://www.samba.org/samba/support/globalsupport.html who offer commercial support if you have specific issues in this area.