[Samba] Deleting undeletable files gives no error

David Shaw dshaw at jabberwocky.com
Fri Feb 24 18:32:02 GMT 2006


On Fri, Feb 24, 2006 at 11:33:44AM -0600, Gerald (Jerry) Carter wrote:
> David Shaw wrote:
> 
> > 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.
> 
> This is by design.
> 
> The internal checks for deleting a file (needed for delete-on-close
> semantics) only look at the file system permissions.  Maybe Jeremy
> has an idea but if you mount a filesystem ro, I would say just mark the
> share with (read only = yes).  I don't see a need to add any other changes.

Perhaps readonly is not the best example.  I'm concerned because the
same thing happens with any of the many reasons why unlink() might
fail.  For example, EIO from a hardware problem, EACCES because the
file has the immutable (uchg) or undeletable flag set, running over a
filesystem that has a notion of retention ("can't delete until 2007"),
etc.

David


More information about the samba mailing list