Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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?

share|improve this question
1  
this has been asked before, and it is always noted as a bad idea. just for reference: askubuntu.com/questions/22383/… –  hbdgaf Aug 25 '12 at 1:33
    
oh I could not find it.. –  themhz Aug 25 '12 at 1:34
add comment

1 Answer

up vote 1 down vote accepted

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.

share|improve this answer
    
ok thanx, I will use it wisely –  themhz Aug 25 '12 at 2:24
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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