LinuxQuestions.org
Help answer threads with 0 replies.
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 02-01-2005, 01:48 AM   #1
fturcic
LQ Newbie
 
Registered: Jan 2005
Location: ACT, Australia
Posts: 16

Rep: Reputation: 0
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...
 
Old 02-01-2005, 01:58 AM   #2
Razze
Member
 
Registered: Dec 2004
Location: Espoo, Finland
Distribution: Gentoo, 2.6.16-gentoo-r11
Posts: 108

Rep: Reputation: 15
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
 
Old 02-01-2005, 08:13 AM   #3
MS3FGX
Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

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


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to recursively rename files using their directory name pattern ceg4048 Linux - General 2 09-28-2005 02:16 PM
/dev entries changing their owner and permissions pulsosu Linux - Security 2 04-11-2005 07:19 PM
Protecting a directory with chmod, owner, groups, others clarence1720 Linux - Newbie 12 11-06-2004 02:33 AM
How to change owner and group in a directory to include subdir and all files Lakota Linux - General 2 07-15-2004 10:35 AM
How to count line numbers recursively in a directory? puzz_1 Linux - General 1 07-01-2004 10:43 AM


All times are GMT -5. The time now is 12:08 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration