Jonathan McKeown
2008-02-09 10:44:05 UTC
I think you may be getting too deep into the detail.
Think of the bigger picture:
when I move a file, I don't expect that to change its ownership or
permissions - it would surprise me if it did;
when I make a copy of a file, I expect to own the copy - after all, what use
is a private copy I can't do anything with?
FreeBSD generally tries hard not to behave in a surprising way.
The bit that still worries me in this discussion is the sgid bit (pun not
intended, but I'm not going to delete it now!): as I understand it, creating
a file has different behaviour on SYSV-derived systems and Berkeley-derived
systems.
SYSV creates files group-owned by the creator's primary group.
BSD creates files which inherit the group-ownership of the directory they are
created in.
SYSV behaviour can be changed to BSD behaviour per-directory, by using the
sgid bit on the directory.
BSD behaviour can't be changed and the sgid bit on a directory is ignored.
Again, could someone confirm whether I'm talking nonsense here?
Jonathan
Think of the bigger picture:
when I move a file, I don't expect that to change its ownership or
permissions - it would surprise me if it did;
when I make a copy of a file, I expect to own the copy - after all, what use
is a private copy I can't do anything with?
FreeBSD generally tries hard not to behave in a surprising way.
The bit that still worries me in this discussion is the sgid bit (pun not
intended, but I'm not going to delete it now!): as I understand it, creating
a file has different behaviour on SYSV-derived systems and Berkeley-derived
systems.
SYSV creates files group-owned by the creator's primary group.
BSD creates files which inherit the group-ownership of the directory they are
created in.
SYSV behaviour can be changed to BSD behaviour per-directory, by using the
sgid bit on the directory.
BSD behaviour can't be changed and the sgid bit on a directory is ignored.
Again, could someone confirm whether I'm talking nonsense here?
Jonathan