This is if my first attempt to create a bash script. I am trying to create a script to check each file owner and group, starting from a specific directory.
For example, if I have this:
files=/* for f in $files; do owner=$(stat -c %U $f) if [ "$owner" != "someone" ]; then echo $f $owner fi done
The ultimate goal is to fix permission issues. However, I cannot force the /* variable to go under everything in / , it will only check files in / and stop in any new directories. Any pointers to how I can check permissions for everything under / and any of its subdirectories?
source share