The correct syntax for a recursive chmod command in Terminal

I need to set recursive permissions on an external HDD to '777' or 'all read&write'.

I have tried all of the following commands in Terminal:

sudo chmod 777 -r /Volumes/...
sudo chmod -r 777 /Volumes/...
sudo chmod a+rw -r /Volumes/...
sudo chmod -r a+rw /Volumes/...

...all of which being back a 'no such file or directory' error, e.g.

sudo chmod 777 -r /Volumes/232Gb
chmod: -r: No such file or directory

Can anyone confirm the correct syntax for this command?

Thanks in advance...

Message was edited by: ChippyDeluxe

MacBook, Mac OS X (10.6.6)

Posted on Apr 7, 2011 4:36 AM

Reply
19 replies

Apr 7, 2011 7:47 AM in response to Linc Davis

If there were a solution that didn't involve using Terminal, I would prefer that.

The reason I ask is, since my old iMac died and I connected my iMac's external HDD to my MacBook, thousands of folders on my external HDD have 'stop signs' on them and require me to go to

Get Info -> Sharing & Permissions

...and add my MacBook username and set the privilege as "read and write". A bigger problem is, no backup software I've tried will back up this external HDD onto another external HDD any more, so I no longer have an up-to-date backup, which is very worrying.

I am looking for a way of fixing this, and the chmod command appears to be the answer.

Ideally, I don't want any permission restrictions on my external HDD at all, so I can connect it to any machine without problems.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

The correct syntax for a recursive chmod command in Terminal

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.