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
link|improve this question

38% accept rate
feedback

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.

link|improve this answer
I run it inside /blocks/. – powtac Aug 16 '11 at 8:33
feedback

Your Answer

 
or
required, but never shown

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