[Samba] files being blanked by writing
joines at bus.okstate.edu
Tue Sep 21 17:51:27 GMT 2004
I'm running Samba 2.2.8a on SuSE Linux 8.1 with kernel 2.4.19. I have
a share defined by this on a web server to allow members of the jamigos
group to edit web pages.
comment = User Web Pages
path = /home
valid users = @jamigos
read only = No
create mask = 0664
force create mode = 0664
directory mask = 0775
force directory mode = 0775
browseable = No
I received a few complaints of save errors followed by missing web
pages so I decided to check it out. Via this share, I opened the file
/home/wasdnord/public_html/4133/1RIGHT.HTM with Mozilla. Here were the
permissions at the filesystem level ahead of time. The group jamigos is
one of my supplementary groups.
drwxrwsr-x+ 2 wasdnord jamigos 104 Sep 21 11:38 ../4133 and
stat shows permissions of 2775.
-rw-rw-r--+ 1 wasdnord jamigos 2334 Oct 16 2003 1RIGHT.HTM
and stat shows 0664.
I made a small change, added a word to the bottom of the file, and
tried to save it. This gave me the rather generic error of "Saving File
failed!" via Mozilla Composer. I looked at the file on the server to
-rw-rw-r--+ 1 wasdnord jamigos 0 Sep 21 12:00 1RIGHT.HTM
What was being reported to me as missing pages was actually files
having their contents erased.
I deleted the file and saved again, this time with no problems yielding:
-rw-rw-r--+ 1 joines jamigos 2626 Sep 21 12:19 1RIGHT.HTM.
It's not an issue of file permissions as I can make the changes with vi
directly on the filesystme with no problem. It's not an editor issue as
I tried both Mozilla and Kate on Linux whereas the problems reported to
me were with a wide variety of editors including frontpage on windows.
Once I own the file, it all works as expected.
Just before trying this I turned the log level up to 3 and here's what
[2004/09/21 11:59:43, 3] smbd/dosmode.c:unix_mode(111)
unix_mode(wasdnord/public_html/4133/1RIGHT.HTM) returning 0664
[2004/09/21 11:59:43, 3]
linux_set_kernel_oplock: got kernel oplock on file
wasdnord/public_html/4133/1RIGHT.HTM, dev = 805, inode = 8439294,
file_id = 435
[2004/09/21 11:59:43, 2] smbd/open.c:open_file(247) joines opened file
wasdnord/public_html/dnor.jpg read=Yes write=No (numopen=1)
[2004/09/21 12:00:02, 2] smbd/open.c:open_file(247) joines opened file
wasdnord/public_html/4133/1RIGHT.HTM read=Yes write=Yes (numopen=1)
[2004/09/21 12:00:02, 3] smbd/trans2.c:call_trans2setfilepathinfo(2394)
[2004/09/21 12:00:02, 3] smbd/error.c:error_packet(94) error string =
Operation not permitted
[2004/09/21 12:00:02, 3] smbd/error.c:error_packet(113) error packet at
smbd/trans2.c(2859) cmd=50 (SMBtrans2) NT_STATUS_ACCESS_DENIED
Naturally, there was tons of other stuff in the log at this level so
I'm not even sure if these errors in the log are related to this
More information about the samba