Changing ownership of directory and all contents

3 posts / 0 new
Last post
BDub's picture
Offline
Last seen: 1 year 15 hours ago
Joined: Dec 20 2003 - 10:38
Posts: 703
Changing ownership of directory and all contents

Hey -

I'm trying to change the ownership of a directory under OS X, and have all of the files and folders (and the files and folders within them etc.) change at the same time. I'm sure my chown syntax just isn't right, or that I'm pushing the button wrong, or something, but can anyone give instructions on how to do this?

-BDub

BDub's picture
Offline
Last seen: 1 year 15 hours ago
Joined: Dec 20 2003 - 10:38
Posts: 703
Got It

The following syntax works (verbose so you can see the change):

sudo chown -Rv newuser ./filename

-BDub

Offline
Last seen: 3 years 7 months ago
Joined: Dec 20 2003 - 10:38
Posts: 851
You can also use chown -R use

You can also use chown -R user:group /path

Log in or register to post comments