Changing ownership / group Using recursive command

Gary P Carr gcarr at lanl.gov
Fri Feb 18 20:13:15 UTC 2005


I am fairly new to Linux myself, so this warning may not apply to Fedora.
On Solaris the chown -R command will follow soft links, which can
create some unexpected results.

At 12:38 PM 2/18/2005, you wrote:
>-----BEGIN PGP SIGNED MESSAGE-----
>Hash: SHA1
>Tim Holmes wrote:
>
>|Hi Folks:
>|
>|I know that this is a kinda basic question, but I don't want to totally
>|mess up my webserver.  I have moved some directories to our new
>|webserver, and because of the move, they have all been flagged as owned
>|by and in the root group.  I want to change this to tholmes owner, and
>|apache group.
>|
>|I am familiar with the chown and chgrp commands, my question pertains to
>|using the recursive flag and the proper syntax for it.  For example the
>|directory /var/www/html/mcaschool/ contains our schools website -- every
>|file within that website should have a owner of tholmes and group of
>|apache.
>|
>|As I understand it, I would issue the following commands from the
>|/var/www/html/mcaschool/ directory:
>|chown tholmes /var/www/html/mcaschool/* -R
>|chgrp apache /var/www/html/mcaschool/* -R
>|
>|Is this correct, or what is the correct command sequence.  I think I
>|have found the right commands, but I don't dare try it till I am sure as
>|I cannot afford to screw up the entire site.
>
>The commands you listed will work; although I would suggest you try using:
>~    chown tholmes.apache /var/www/html/mcaschool/* -R
>and you may want to change ownership of the directory itself;
>otherwise, any new files in the root directory will still be owned by
>the owner of the directory.
>~    chown tholmes.apache /var/www/html/mcaschool
>
>
>|
>|Thanks
>|
>|Tim Holmes
>|
>|IT Manager / Webmaster
>|Medina Christian Academy
>|A Higher Standard...
>|
>|Jeremiah 33:3
>|Jeremiah 29:11
>|Esther 4:14
>|
>|
>|
>
>-----BEGIN PGP SIGNATURE-----
>Version: GnuPG v1.4.0 (MingW32)
>Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
>iD8DBQFCFkQzkNLDmnu1kSkRAlxiAJ9cLYm/rgLU9D70NyomOF5wRmvytQCfaQl/
>0GTuE/0EwlewWOrUws17/nE=
>=wx+n
>-----END PGP SIGNATURE-----
>
>--
>fedora-list mailing list
>fedora-list at redhat.com
>To unsubscribe: http://www.redhat.com/mailman/listinfo/fedora-list






More information about the fedora-list mailing list