Changing Ownership Using Terminal
Advanced, Article, Mac OS X, Terminal | April 5th, 2008
Getting used to your way around Terminal? Starting to wonder about some other useful tips for it? Terminal provides a quick and easy way to change file ownership. This tutorial will tell you exactly how to do it.
Warning: Using Terminal can be very dangerous and is for advanced users only. Be very, very careful with what you do in Terminal as you can cripple your Operating System. Also, note that these commands below can only be performed if you have Admin access.
- The first step is to navigate to your file. If you already know the full path of the file, all the better. Once you know where your file is, type in
sudo chown username:group path/to/file.extensionIn my example, I would typesudo chown admin:staff myFile.txtThen hit enter. You may be required to enter your admin password.
- If everything goes right you won’t get any error messages. Do a
ls -alcommand and you will notice your changes.
That’s it, simple and easy.
![Validate my RSS feed [Valid RSS]](http://www.anythingapple.net/wp-content/themes/anythingapple/images/valid-rss.png)