find . -iname file | find /path/to/base/dir -type d -exec chmod 755 {} +

ubu1404@ubuntu1404lb01:/tmp$ find . -iname file
find: `./vmware-root': Permission denied
./file
./FILE


To recursively give directories read&execute privileges:
find /path/to/base/dir -type d -exec chmod 755 {} +
To recursively give files read privileges:
find /path/to/base/dir -type f -exec chmod 644 {} +

Comments

Popular posts from this blog

HAproxy logging

teamcity Automatic Agent Start under Linux

NFS mount add in fstab _netdev instead of default | firewall-cmd --list-all