LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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
  Search this Thread
Old 04-05-2004, 09:21 PM   #1
Johng
Member
 
Registered: Feb 2002
Location: NZ
Distribution: Kubuntu, Mint
Posts: 408

Rep: Reputation: 31
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
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
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: Kubuntu, Mint
Posts: 408

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

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

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
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: Kubuntu, Mint
Posts: 408

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

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

Cheers
 
  


Reply



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



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 / openSUSE 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

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration