#/bin/bash #Script to detect recursively files that a user do not have access to. #Bertrand VANDEPORTAELE 2016 #inspired from http://unix.stackexchange.com/questions/88573/find-files-that-a-user-can-not-read #run this script from the folder where you want to detect the files that USERNAME don't have access to #this script has to be run as sudo in order to recurse inside directory with restricted read access #write the username for whom to test access right USERNAME=bvandepo find . -print0 | sudo -u $USERNAME perl -Mfiletest=access -l -0ne 'print unless -r'