1753374 Members
5044 Online
108792 Solutions
New Discussion юеВ

Re: ownership changing

 
SOLVED
Go to solution
himacs
Super Advisor

ownership changing

Hi Admins,

I have to change the ownership of a directory which holds many subfolders.And again these subfolders holds many subfolders.

Now please let me know how i can change ownership of all the files and subfolders at a shot.

Thanks in advance

himacs
4 REPLIES 4
James R. Ferguson
Acclaimed Contributor
Solution

Re: ownership changing

Hi:

# chown -R newowner /mypath

...or perhaps a bit more safely:

# cd /mypath && chown -R newowner .

Regards!

...JRF...
Jim Walls
Trusted Contributor

Re: ownership changing

man chown
man chmod
himacs
Super Advisor

Re: ownership changing

Hi JRM,Jim

Thanks for the response ..Points assigned.

Regards
himacs
Bill Hassell
Honored Contributor

Re: ownership changing

Be VERY CAREFUL when using chown -R (or chmod -R). If your current directory is not correct (like /, the worst possible directory for root to be in), you can destroy the entire system.


Bill Hassell, sysadmin