LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   change ownership (https://www.linuxquestions.org/questions/linux-general-1/change-ownership-166665/)

Johng 04-05-2004 10:21 PM

change ownership
 
Hi

Can someone tell me the command to change the ownership of a directory and all its contents, eg /john john root to /john john john

I have tried chown, but obviously I don't understand the syntax!

johng

win32sux 04-05-2004 10:36 PM

this would make "sandra" of the group "geeks" the owner of all of the files and directories inside "/example":

chown -R sandra.geeks /example/*



this would make "sandra" of the group "geeks" the owner of "/example", as well as all of the files and directories inside it:

chown -R sandra.geeks /example



http://www.die.net/doc/linux/man/man1/chown.1.html

Johng 04-06-2004 01:43 AM

Thanks for that. How do I change the group?

Johng

win32sux 04-06-2004 01:49 AM

chgrp -R geeks /example

http://www.die.net/doc/linux/man/man1/chgrp.1.html

Johng 04-06-2004 03:24 AM

Thank you win32sux for your prompt and easily understood answers.

Why can't the How To pages be as easy to understand!

Cheers


All times are GMT -5. The time now is 06:30 AM.