SUMMARY: SGID on a directory, mv blows the theory!

From: Dennis Martens <Dennis_Martens_at_health.qld.gov.au>
Date: Thu May 09 2002 - 19:54:15 EDT
Thanks to all who replied:

Spencer Hoffman
Dave Mitchell
Johan Hartenberg
Chris Hoogendyk
Kevin Reichhart
Michael Schulte
Matthew Stier
Darren Dunham
Jason Haynes
Jay Lessert
David Foster

All of whom pointed out the behaviour of mv opposed to cp. Thanks, but that's
what I had pointed to in the first place! More of a concern is that the stated
behaviour of a SGID (all files created in the directory will belong to the
named group) does not happen with a mv.

As you all stated, mv does not create a "new file", but modifies the pointer
in an existing inode. That's fine, but for all intents and purposes, it IS a
new file in THIS directory.

Johan had the best suggestion: write a wrapper script for mv. I will do this,
because the application that we are running is very reliant on file
ownerships.

Thanks for your time.


Original Post:

All

A small but very annoying problem. Nothing appropriate in the archives, so
would appreciate the help.

We have a directory on a Solaris8 server which has the SGID bit set, allowing
all files created in the directory to belong to the same group, the one that
the directory belongs to. This works fine when creating new files with touch,
cat, vi and so on, and works fine with cp as well. But when you mv a file,
the
rules seem to go out the window, and the file belongs to the default group of
the user doing the mv.

Is this a feature?

Thanks, I will send out a summary.







Dennis Martens
Unix Administrator, BCISU
Queensland Health , Brisbane Australia
617 32340729
Fax 32341289


**********************************************************************
This e-mail, including any attachments sent with it, is confidential
and for the sole use of the intended recipient(s). This confidentiality
is not waived or lost if you receive it and you are not the intended
recipient(s), or if it is transmitted/ received in error.

Any unauthorised use, alteration, disclosure, distribution or review
of this e-mail is prohibited.  It may be subject to a statutory duty of
confidentiality if it relates to health service matters.

If you are not the intended recipient(s), or if you have received this
e-mail in error, you are asked to immediately notify the sender by
telephone or by return e-mail.  You should also delete this e-mail
message and destroy any hard copies produced.
**********************************************************************
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers


Dennis Martens
Unix Administrator, BCISU
Queensland Health , Brisbane Australia
617 32340729
Fax 32341289


**********************************************************************
This e-mail, including any attachments sent with it, is confidential
and for the sole use of the intended recipient(s). This confidentiality
is not waived or lost if you receive it and you are not the intended
recipient(s), or if it is transmitted/ received in error.

Any unauthorised use, alteration, disclosure, distribution or review
of this e-mail is prohibited.  It may be subject to a statutory duty of
confidentiality if it relates to health service matters.

If you are not the intended recipient(s), or if you have received this
e-mail in error, you are asked to immediately notify the sender by
telephone or by return e-mail.  You should also delete this e-mail
message and destroy any hard copies produced.
**********************************************************************
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
Received on Thu May 9 19:59:10 2002

This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:42:42 EST