LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Changing owner of a directory recursively? (https://www.linuxquestions.org/questions/linux-general-1/changing-owner-of-a-directory-recursively-284767/)

fturcic 02-01-2005 12:48 AM

Changing owner of a directory recursively?
 
How would I change the ownership of a certain directory (and its contents) recursively? I am aware of the chmod command but am not sure how would I specify a user...

Razze 02-01-2005 12:58 AM

Hello!

Chmod is only for changing the rights to the file. For changing owners you want to use the command chown. For recursive changing use the switch -R

Code:

# chown -R user:group direcory_to_be_changed

Razze

MS3FGX 02-01-2005 07:13 AM

For future reference, "-R" is used by nearly all programs to specify a recursive action.


All times are GMT -5. The time now is 05:26 AM.