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 07-15-2004, 08:55 AM   #1
Lakota
Member
 
Registered: Oct 2003
Location: London, ON, Canada
Distribution: Mandriva 2007 Free
Posts: 507

Rep: Reputation: 30
How to change owner and group in a directory to include subdir and all files


I am trying to rescue a few hundred files. They are located at /home/don/tmp/ROOTowned
These are files I rescued and moved around prior to reinstalling Mandrake 10. Also prior to having learned there was an easy fix for my system and you don't have to reinstall. When I was moving them logged in as root, permissions all changed from don to root. Anyway I can't figure out how to properly use "chown" to change owner and group to be "don" from the directory "ROOTowned" including all subdirectories and files.

So far I've only figured out the proper syntax to chown an individual directory, it changed owner, but not group, and did not change owner or group of files in that directory.

Any help on proper syntax to change owner and group to don, for ROOTowned and all directories and files within that directory would be appreciated.
 
Old 07-15-2004, 08:59 AM   #2
Quis
Member
 
Registered: May 2001
Location: Germany, Süd-Baden
Distribution: Gentoo
Posts: 139

Rep: Reputation: 15
you have to use the -R or --recursive option for chown.
e.g.: chown -R someuser:somegroup home/
 
Old 07-15-2004, 09:35 AM   #3
Lakota
Member
 
Registered: Oct 2003
Location: London, ON, Canada
Distribution: Mandriva 2007 Free
Posts: 507

Original Poster
Rep: Reputation: 30
Quis-
Worked like a charm, thank you.
 
  


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
group owner etc MI3GTO Mandriva 3 02-27-2005 08:26 PM
setting a group for new files in a directory eantoranz Linux - Security 2 01-18-2005 01:44 PM
sudo changes the owner and the group of some my files and now I can't enter in X Ali79 Linux - Software 5 12-10-2004 01:01 PM
deleting all *.m3u files in a directory+subdir? minm Linux - Newbie 5 10-12-2004 03:31 PM
How to know the property a directory include the files and subdirectories? Xiangbuilder Linux - Newbie 3 08-31-2003 05:48 AM

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

All times are GMT -5. The time now is 01:19 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