How to change ownership of a folder using terminal

command-line-interfacemac-osxmac-osx-server

How do I change the ownership of folders on a secondary hard drive using chown to make the folder owner be administrator?

When I use:

chown -R username foldername

I get an error Read Only filesystem

Does anyone have ideas?

Best Answer

The command syntax is:

chown [options] username:groupname filename

if you just want to change the user for a given folder you can leave out the :groupname and also add in a -R to make the command go recursively through all the files in the folder like so:

chown -R username foldername

Unless your main account is called "Administrator" this is probably not the username you want to use on OSX. Do you want to give yourself permissions or root?

In response to "Error: Read Only filesystem":

If the file system is NTFS, Mac OS X does not natively support modifying NTFS file systems but there is third party software available. See:

How-to: Read and Write NTFS Windows Partition on Mac OS X

It's buggy though so I would be careful.

Related Topic