file permissions find
how to search for dirs/files which have
permissions greater than 755? |
I'm sure someone will chime in with a more graceful option....
But the simplest way that comes to mind would be to search for files that don't have that set of permissions. ls -lR /* |grep -v rwxr-xr-x |grep -v rwxr--r-- |etc... Then you could direct it into a file and sift through it for what you're looking for. HTH |
you can use find command too,
Code:
find /dir -type f -perm 777 -o -perm 776 -o -perm 766 .... |
I'm afraid that find doesn't filter based on whether a mode is greater than something. It goes by bits, so you can say ask it to match all files with at least the read, write, and executable bit set for the owner, and at least the read and executable bit set for the group and others. To do this, you want
Code:
find -perm -755 Code:
find -perm -755 -o -perm -766 |
Your semantics are skewed. File permissions are bitfields, so one is not really "higher" than another. However, I assume you mean all files that are group/world writable and/or have suid/sgid/sticky bit set, in which case,
Code:
find / -perm +7022 find man page: Quote:
|
All times are GMT -5. The time now is 10:44 PM. |