10

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.

14

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.

| improve this answer | |
  • 2
    chmod 777 Sites/tom/upload/thumbs did the trick. thanks – Tom May 18 '11 at 14:42
  • 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 May 18 '11 at 14:46
  • 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 '18 at 1:49
0

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

| improve this answer | |
  • 1
    (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. – G-Man Says 'Reinstate Monica' Mar 14 at 2:52
0

You have to type the following command in your terminal

sudo chmod -R 777 folderName
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.