while read d; do ls -ld "$d" chown www-data. "$d" chmod u+wX "$d" ls -ld "$d" done < <(find /var -type d -name 'imagens')