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.

2 Answers 2


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


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


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


the thumb directory is not there.

  • 2
    chmod 777 Sites/tom/upload/thumbs did the trick. thanks
    – Tom
    May 18, 2011 at 14:42
  • 4
    @tom, np, dont forget to use -R in case thumbs has subdirectories, unless you don't want to change the permissions on subdirs.
    – hvgotcodes
    May 18, 2011 at 14:46
  • 1
    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
    Oct 26, 2018 at 1:49

While in any location in your terminal type the following

sudo chmod 777 /path/to/your/folder/*

Be sure to be sudo and the /* after folder means that you want to give permissions to any subfolder in the folder

  • 2
    (1) The user wants to chmod his own directory, so sudo is inappropriate.  (2) The question says that the user wants to chmod a folder (directory).  The command you show will not chmod the named directory, but only the files and subdirectories it contains.  It’s better to use -R and leave off the /*.  (3) Aside from the parts that are wrong, this doesn’t really contribute any information that isn’t already in the accepted answer. Mar 14, 2020 at 2:52
  • Also, this answer doesn’t add anything new to a question that was answered similarly 9+ years ago/ Nov 28, 2020 at 0:19

You must log in to answer this question.

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