LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
LinkBack Search this Thread
Old 04-05-2004, 09:21 PM   #1
Johng
Member
 
Registered: Feb 2002
Location: NZ
Distribution: Mageia
Posts: 278

Rep: Reputation: 30
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
 
Old 04-05-2004, 09:36 PM   #2
win32sux
Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
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

Last edited by win32sux; 04-05-2004 at 09:41 PM.
 
Old 04-06-2004, 12:43 AM   #3
Johng
Member
 
Registered: Feb 2002
Location: NZ
Distribution: Mageia
Posts: 278

Original Poster
Rep: Reputation: 30
Thanks for that. How do I change the group?

Johng
 
Old 04-06-2004, 12:49 AM   #4
win32sux
Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
chgrp -R geeks /example

http://www.die.net/doc/linux/man/man1/chgrp.1.html
 
Old 04-06-2004, 02:24 AM   #5
Johng
Member
 
Registered: Feb 2002
Location: NZ
Distribution: Mageia
Posts: 278

Original Poster
Rep: Reputation: 30
Thank you win32sux for your prompt and easily understood answers.

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

Cheers
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot change ownership jamaso Slackware 11 11-08-2010 11:01 AM
Change ownership apffal Suse/Novell 1 11-09-2005 02:08 AM
How to change ownership of a drive? raid517 Linux - Software 1 09-15-2005 08:15 AM
unable to change ownership arjunjeyaprakash Linux - Newbie 12 09-06-2005 02:02 PM
Couldn't change ownership on a Fat32 partition kt8993 Linux - Security 2 01-09-2005 10:21 AM


All times are GMT -5. The time now is 05:22 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration