[Samba] Empty files created on Windows
Jeremy Allison
jra at samba.org
Fri Feb 27 09:30:14 MST 2015
On Fri, Feb 27, 2015 at 11:29:02AM +0000, John wrote:
>
> I am trying to understand the difference between files created on a
> Samba share via Windows and directly the server's file system.
>
> I note from "stat" that an empty file created on the server with "touch"
> is zero bytes and zero blocks. However, an empty file created with
> Windows Explorer rightclick->new->text document is also zero bytes but
> uses 8 blocks.
>
> Adding an ACL to the server-created file doesn't change its block size
> but copying the ACL from the windows-created file does:
>
> $ cp --attributes-only --preserve=xattr b.txt a.txt
>
> I'd like to understand the differences; I've tried the usual internet
> searches without luck. Is this something that anyone here would know
> about ?
Windows can request an allocation be made on disk when
creating a file. This allocation can be different from
the file size. Samba supports this using the fallocate()
call on Linux (at least).
More information about the samba
mailing list