[Samba] Deleting undeletable files gives no error

David Shaw dshaw at jabberwocky.com
Fri Feb 24 17:07:19 GMT 2006


I have an odd problem that involves clients deleting files they should
not be able to delete, and claiming success, but then the files "come
back" again.

Here's the setup: I have a filesystem that contains a file
"foobar.txt" owned by user "test", group "test".  Permissions on this
file are 644, permissions on the enclosing directory are 777.

I share this filesystem via samba (version 3.0.20), using this config:

[test]
   path=/mnt/test
   writable = yes
   browsable = yes
   hide dot files = yes
   wide links = no
   delete readonly = yes
   guest ok = yes
   guest only = yes
   force create mode = 400
   force directory mode = 700
   force user = test
   force group = test

I mount this share on an XP box.  I delete foobar.txt.  It works and
all is well.

Then I do the same exact test except mount /mnt/test readonly.  Now,
when I delete foobar.txt, it seems to work, but refreshing the XP
window or doing "dir" again shows the file wan't actually deleted.
Obviously you can't delete a file off of a readonly filesystem, but
(and here's the problem) shouldn't there have been an error message
given?  The delete failed, but the user wasn't informed.

David


More information about the samba mailing list