Offline synchronization fails if not owner of file

Craig Box craig at
Mon Nov 3 04:08:29 GMT 2003

Hi everyone,

I ran this problem past the samba mailing list to a blank stare, and
after some discussion on the samba-technical (thanks abarlett), we
figured out what the problem was.  (Please excuse or correct any
incorrect assumptions in this message.)

(You might like to start by reading the overview of the problem at

When you try and synchronize a file that you have edited offline, but
are not the owner of (an easy scenario in a shared documents direcotry),
Samba will attempt to either change ctime on the file (presumably in
order to set the modification time to match the time, in the past, that
the file was modified) or the permissions of it.  Because you are
neither the owner, nor root, you cannot make these changes, and it
reports Access Denied to Windows.

I think the problem boils down to these lines:

[2003/11/03 09:08:51, 3] smbd/dosmode.c:unix_mode(111)
  unix_mode(Test/Setting up a PSC Quickscan 6000 Plus.doc) returning
[2003/11/03 09:08:51, 2] smbd/trans2.c:call_trans2setfilepathinfo(2803)
  chmod of Test/Setting up a PSC Quickscan 6000 Plus.doc failed
(Operation not permitted)
[2003/11/03 09:08:51, 3] smbd/error.c:error_packet(91)
  error string = Operation not permitted
[2003/11/03 09:08:51, 3] smbd/error.c:error_packet(103)
  error packet at smbd/trans2.c(2804) cmd=50 (SMBtrans2)

The log of this error on 2.2 (Debian's 2.2.3a-12.3 in this instance, but
it also occurs on 2.2.8a-0.1 from can be found at

The file will be synchronized correctly, but Windows will say that the
synchronization failed (Access Denied.)  When you go to sync again, you
will be told that the file is newer on the server (true) and if you
accept this, then the error is acknowledged and disappears.  

On Samba 3, it doesn't even write the changed file at all.  The level 10
log from Samba 3 is at
but I couldn't find the same error in it; I might have logged wrong.  I
will have another play with this when I get some time and put a new log

Anything I can do to help work this one out, let me know.


Craig Box                       Phone   07 957 2653
IT Partners Ltd                 Fax     07 957 2659
PO Box 9361                     
Hamilton, New Zealand

More information about the samba-technical mailing list