You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

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
Question marked as Top-ranking reply

Posted on Apr 7, 2011 5:52 AM

Questions about the shell belong in the UNIX forum, but the answer is

sudo chmod -R 777 /Volumes/theVolume

This is almost certainly not what you should do, but that wasn't your question.
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.

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.