7

I don't know what is happening

experimentx@workmateX:/var/www$ sudo chmod 0777 -r /var/www/

chmod: cannot access `0777': No such file or directory

experimentx@workmateX:/var/www$ 

4 Answers 4

12

Use this:

sudo chmod 0777 -R /var/www/

-R instead of -r.

5
  • well thanks to you both ... but what the hell happened? I had been using -r untill now, and suddenly .. -R
    – S L
    Apr 7, 2011 at 8:31
  • 3
    There was no -r in chmod ever, there is only -R or --recursive. Apr 7, 2011 at 8:41
  • Yeah, chmod doesn't have any -r option.
    – Pedram
    Apr 7, 2011 at 8:49
  • well, i had been doing -r until i updated my system yesterday .. on version 10.10
    – S L
    Apr 8, 2011 at 7:15
  • 1
    I don't know what happened in your case but chmod is one the commands that are common between all linux distributions and has nothing to the with a specific version of ubuntu.
    – Pedram
    Apr 8, 2011 at 7:27
8

Use "-R" instead of "-r".

From the chmod help:

-R, --recursive change files and directories recursively

0
2

Also note that the 0 will no longer clear suid/sgid/sticky in recent versions of chmod and you'll soon have to use a symbolic mode (if that's what you're intending to do).

0

Perhaps going or directing the file in terminal and once you locate file by:

ls

then run the command:

chmod +x filename

from that location I'm sure it will work.

You must log in to answer this question.

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