Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a document root folder and I want to cange the group of only the cache directories. How can I do this recursive?

The cache directories are always below templates/html, and I want to change it to wwwrun:www.

The folder structure looks like:

/blocks/element1/templates/html/cache1    root:root   <- this
/blocks/element1/lib/file.html            root:root
/blocks/element1/lib/file-xy.html         root:root
/blocks/element2/templates/html/cache1    root:root   <- this
/blocks/element2/templates/html/cache2    root:root   <- this
/blocks/element2/lib/file.html            root:root
/blocks/element2/img/icon.png             root:root
/blocks/element3/templates/html/cache2    root:root   <- this
/blocks/element3/logo.jpg                 root:root
share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

running

find . -type d -name "cache*" -exec chown -R wwwrun:www {} \;

inside templates/html should do it.

share|improve this answer
    
I run it inside /blocks/. –  powtac Aug 16 '11 at 8:33
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.