0

with this command

sudo chmod 777 /var/www/

I get 777 on www but not under www/subdir1/subdir2 how can I set all subdirectories recursively to 777 with one command?

themhz
  • 477
  • 1
    this has been asked before, and it is always noted as a bad idea. just for reference: http://askubuntu.com/questions/22383/how-to-give-read-write-permission-to-a-folder-and-its-sub-folders-and-files – RobotHumans Aug 25 '12 at 01:33
  • oh I could not find it.. – themhz Aug 25 '12 at 01:34

1 Answers1

1

Use the -R flag.

so the command would be sudo chmod -R 777 /var/www/.

This is, however a bad idea and you should normally do it one at a time.

Alex L.
  • 3,348
  • 1
  • 18
  • 21