13

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?

2

1 Answer 1

14

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.

4
  • When i do this, I get a an error 'Read only filesystem' any ideas
    – Gatura
    Commented Jan 27, 2010 at 8:28
  • How is the external hard drive connected? Is the hard drive formatted NTFS? If so then you will have problems making changes. Mac OS X does not natively support modifying NTFS file systems but there is third party software available: lifehack.org/articles/lifehack/… Its buggy though so I would be careful.
    – einstiien
    Commented Jan 27, 2010 at 8:40
  • in macOS "sudo chown username folder1/folder2" or "sudo chown username folder2" command works fine to change ownership of "folder2", & folder2's group remains same as earlier.
    – atErik
    Commented Jan 18, 2023 at 14:14
  • In macOS / OSX, be-careful : when any non-system / general sub-folder's user & group ownership changed with "chown usr2:grp2 D1/D2", then it works on D2 sub-folder, but parent folder D1's user ownership changed into "usr2", & earlier group ownership of parent-D1 remains intact . If "chown usr2:wheel D1/D2" used, then parent D1's group ownership changes into "wheel" (if D1 is non-system folder).
    – atErik
    Commented Jan 18, 2023 at 14:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .