LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   How to change owner and group in a directory to include subdir and all files (http://www.linuxquestions.org/questions/linux-general-1/how-to-change-owner-and-group-in-a-directory-to-include-subdir-and-all-files-205358/)

Lakota 07-15-2004 08:55 AM

How to change owner and group in a directory to include subdir and all files
 
I am trying to rescue a few hundred files. They are located at /home/don/tmp/ROOTowned
These are files I rescued and moved around prior to reinstalling Mandrake 10. Also prior to having learned there was an easy fix for my system and you don't have to reinstall. When I was moving them logged in as root, permissions all changed from don to root. Anyway I can't figure out how to properly use "chown" to change owner and group to be "don" from the directory "ROOTowned" including all subdirectories and files.

So far I've only figured out the proper syntax to chown an individual directory, it changed owner, but not group, and did not change owner or group of files in that directory.

Any help on proper syntax to change owner and group to don, for ROOTowned and all directories and files within that directory would be appreciated.

Quis 07-15-2004 08:59 AM

you have to use the -R or --recursive option for chown.
e.g.: chown -R someuser:somegroup home/

Lakota 07-15-2004 09:35 AM

Quis-
Worked like a charm, thank you.


All times are GMT -5. The time now is 10:37 PM.