-   Linux - Newbie (
-   -   How to chown entire folders and files and subs? (

natbrazil 03-14-2008 12:01 PM

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)


bigrigdriver 03-14-2008 12:04 PM

chown -R owner:group /dirname (recursive chown)

natbrazil 03-14-2008 02:25 PM

Thanks Very Much!

c0de_m0nkey 03-14-2008 09:35 PM

Thanx from me also.

Originally Posted by bigrigdriver (Post 3088715)
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

dixpat 04-13-2008 12:24 AM

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!

Kahless 04-13-2008 02:18 AM

It goes as deep as your directory structure cares to go.

dasy2k1 04-13-2008 07:56 AM

-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)

dixpat 04-13-2008 11:22 PM

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!

All times are GMT -5. The time now is 10:27 AM.