Setting chmod 777 on folder using Mac Terminal

8

6

I am trying to set the upload permissions on a local folder in my test website.

I'm using Terminal on a Mac and the following command:

chmod 777 thumbs

but I get the following error

chmod: thumbs: No such file or directory

I'm really not all that sure about using Terminal so sorry if I'm not being clear - I'm trying to set up a PHP site locally on my Mac.

Tom

Posted 2011-05-18T14:28:58.613

Reputation: 183

Answers

12

you have to be in the directory that contains thumbs. Do an

ls 

to see whats in your current directory. You can also do a

pwd

to see where on the filesystem you are. typically when you log in you are in

/home/yourusername

the thumb directory is not there.

hvgotcodes

Posted 2011-05-18T14:28:58.613

Reputation: 748

Tip for future readers: You can type chmod 777, leave a space after it, and then drag the file or folder from Finder into Terminal. Terminal will fill in the correct path for you. Not only does this eliminate the possibility of typos, it spares you having to manually escape any spaces that might exist in the name. – Mentalist – 2018-10-26T01:49:43.990

2chmod 777 Sites/tom/upload/thumbs did the trick. thanks – None – 2011-05-18T14:42:43.787

3@tom, np, dont forget to use -R in case thumbs has subdirectories, unless you don't want to change the permissions on subdirs. – hvgotcodes – 2011-05-18T14:46:10.790