0

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
powtac
  • 639
  • 2
  • 6
  • 19

1 Answers1

2

running

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

inside templates/html should do it.

plaix
  • 68
  • 3