Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 8 Feb 2008 12:28:57 +0100
From:      "Wouter Oosterveld" <wouter@fizzyflux.nl>
To:        "Pietro Cerutti" <gahr@gahr.ch>, freebsd-questions@freebsd.org
Subject:   Re: rename and chmod (was: cp -p)
Message-ID:  <b4950de90802080328w1ef8c2c8if87c93381fbef7a0@mail.gmail.com>
In-Reply-To: <47AC2018.6010403@gahr.ch>
References:  <47AC2018.6010403@gahr.ch>

next in thread | previous in thread | raw e-mail | index | archive | help
>Now, from a logical point of view, why moving a file into a directory
doesn't fall into the "created into them" case?

Because (if on the same filesystem) you don't create a new file. You
just link the file in the destination dir and unlink the file from the
source dir.

Regards,

Wouter

2008/2/8, Pietro Cerutti <gahr@gahr.ch>:
> Ok, my view is getting clearer ;-)
>
>
> my problem in understanding the semantics of mv, cp -p and the rename(2)
> function seems to be related to the terminology used in chmod(1) man page.
>
> This is the explanation of setuid (the same holds for setgid):
>
> "Directories with this bit set will force all files and subdirectories
> created in them to be owned by the directory owner and not by the uid of
> the creating process, if the underlying file system supports this feature"
>
> Now, from a logical point of view, why moving a file into a directory
> doesn't fall into the "created into them" case?
>
>
> --
> Pietro Cerutti
>
> PGP Public Key:
> http://gahr.ch/pgp
>
>
>


-- 
[
  wouter@berenboot.xs4all.nl is binnenkort niet meer,
wouter@fizzyflux.nl is mijn nieuwe email-adres.
]



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?b4950de90802080328w1ef8c2c8if87c93381fbef7a0>