LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 03-14-2008, 12:01 PM   #1
natbrazil
LQ Newbie
 
Registered: Aug 2003
Posts: 17

Rep: Reputation: 0
How to chown entire folders and files and subs?


Hi all,

Could someone please help with an example of how to change ownership of an entire folder, its files and its subfolders (and files)?

I can only find simple file examples, not what I need.

I usually use WebMin, but I can't figure out how to make WebMin's File Manager change the owners without changing the permissions as well.
(So if anyone knows how to do this via WebMin, that would be greatly appreciated as well)

Thanks,
Nat
 
Old 03-14-2008, 12:04 PM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian Squeeze
Posts: 5,768

Rep: Reputation: 307Reputation: 307Reputation: 307Reputation: 307
chown -R owner:group /dirname (recursive chown)
 
Old 03-14-2008, 02:25 PM   #3
natbrazil
LQ Newbie
 
Registered: Aug 2003
Posts: 17

Original Poster
Rep: Reputation: 0
Thanks Very Much!
 
Old 03-14-2008, 09:35 PM   #4
c0de_m0nkey
LQ Newbie
 
Registered: Mar 2008
Distribution: 5 servers all Redhat; Kubuntu and Debian on Desktops
Posts: 1

Rep: Reputation: 0
Thanx from me also.

Quote:
Originally Posted by bigrigdriver View Post
chown -R owner:group /dirname (recursive chown)
WOW, talk about service...

I just joined/logged-in/searched and the answer was already here.

Thanx Again
 
Old 04-13-2008, 12:24 AM   #5
dixpat
LQ Newbie
 
Registered: Mar 2007
Posts: 5

Rep: Reputation: 0
That "-R" is great for changing the next level down, but how about multi-levels? I've gotta chown (or chmod.. I don't know if either would work) my .mozilla dir, so that's maybe five levels if I wanna take half the night chasing down subfolders, but I'd rather learn a better way for the next time I need it!
 
Old 04-13-2008, 02:18 AM   #6
Kahless
Member
 
Registered: Jul 2003
Location: Pennsylvainia
Distribution: Slackware / Debian / *Ubuntu / Opensuse / Solaris uname: Brian Cooney
Posts: 503

Rep: Reputation: 30
It goes as deep as your directory structure cares to go.
 
Old 04-13-2008, 07:56 AM   #7
dasy2k1
Member
 
Registered: Oct 2005
Location: 127.0.0.1
Distribution: Ubuntu 12.04 X86_64
Posts: 956

Rep: Reputation: 34
-R on many simple comandse is recursive, it goes as deep as its possable to go in that directory...

it wll work with mv, cp, chmod, chown, and rm, so allways check you are in the right place before running rm -r

(oh, in some its -R and some -r)
 
Old 04-13-2008, 11:22 PM   #8
dixpat
LQ Newbie
 
Registered: Mar 2007
Posts: 5

Rep: Reputation: 0
Wink Thanks!

I got it. I had transferred some hidden files to a new machine. It didn't turn out to be an ownership question after all but permissions. The permissions got changed in the move. I found it and changed it back via the gui to get read & write privileges back.

Thanks again!
 
  


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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
chown, chgrp an entire directoy and contents gin1 Red Hat 8 09-06-2013 02:48 AM
Samba can create new files and folders but access denied in any new folders k.king Linux - Networking 2 01-15-2006 06:14 AM
useing SCP to copy entire directories with sub folders? Lleb_KCir Linux - General 5 09-13-2005 09:08 PM
chmod/chown and folders :) chibi Linux - Newbie 2 04-28-2005 04:56 PM
chmod vs chown on some root files and yes apps ergo_sum Linux - Newbie 3 11-12-2003 10:49 AM


All times are GMT -5. The time now is 11:50 AM.

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