File permissions/ownership lost?

David Bullock davidb at loftuscomp.com.au
Fri Mar 12 01:49:14 GMT 1999


>  Can samba be persuaded to maintain the owner/group-owner of the
>  original file?  Or is this a "feature" of the way WORD/Excel/etc work
>  (create new file, delete old, with no owner/mode retention)?

As mentioned in another reply, Word and Excel create new
files rather than overwrite the existing files, so Samba/Unix
correctly assign the new ownership to 'updated' files.

By using chmod g+s for the directory in conjunction with
force create mode, you can get reasonable control for
access to all files in a directory.

If it is of interest, we have a set of mods which we make
to Samba for our clients which allows us to set up certain
smb.conf settings (force create mode, admin user, and
a few others) per directory including newly created
directorie, rather than per share as in standard samba.

Once set up, samba looks after itself without extra admin
for most business use, and the users access all their
documents, public, workgroup or private, through a single
share with the appropriate security supplied by Unix and
maintained by Samba.

These mods have the potential to also maintain the same
file ownership for word docos etc, but I haven't needed to
do it.

BTW, the g+s setting for a directory trick breaks with
Samba (with Unix really) when a file with a different group
ownership is moved into the directory.  The moved file
retains its group ownership.  I keep meaning to add a
mod for this, but in practice our clients have not hit that
problem.

David Bullock
Loftus Computing Services
Adelaide, South Australia



More information about the samba mailing list