vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| I used "find / -perm 4000" to find all suid files on the system, what i want to do is "find /home -perm +x" but that doesn't work, i've read the man page, but i can't quite get it.. what command can i use to find any file, with any exec bit (u+x OR g+x OR o+x) set? Thanks -- -alex |
| |||
| On Thu, 13 May 2004 14:42:25 GMT, "alex" <alex@hotmail.com> wrote: >I used "find / -perm 4000" to find all suid files on the system, > >what i want to do is "find /home -perm +x" but that doesn't work, i've read >the man page, but i can't quite get it.. what command can i use to find any >file, with any exec bit (u+x OR g+x OR o+x) set? > >Thanks 'find /home -perm +1' should produce what you are looking for. Scott McMillan |
| |||
| root@aeshells.com:~# find /home -perm 1 root@aeshells.com:~# find /home -perm 111 root@aeshells.com:~# nope, neithier of those work, the part that gets me is that is says in the man page, "exact permissions" i've tested this and i can do -perm 740 and it will find any that are exactly "740, etc.. etc.. is there anyway i can put this in a loop or something find all possible combinations that include a 1 - 3 -5 -7 at any bit? instead of manually coding a file that searches for each exact possiblity? find /home -perm 001 >> find-exe.log find /home -perm 010 >> find-exe.log find /home -perm 100 >> find-exe.log find /home -perm 410 >> find-exe.log ....etc...etc... there are 343 possible cominations of permissions, and (if i did the right math) 64 of them would be exucutable... anyway to automate this? --alex |
| |||
| On Thu, 13 May 2004 11:15:17 -0400, Scott McMillan <smcm@usa.net> wrote: >On Thu, 13 May 2004 14:42:25 GMT, "alex" <alex@hotmail.com> wrote: > >>I used "find / -perm 4000" to find all suid files on the system, >> >>what i want to do is "find /home -perm +x" but that doesn't work, i've read >>the man page, but i can't quite get it.. what command can i use to find any >>file, with any exec bit (u+x OR g+x OR o+x) set? >> >>Thanks > >'find /home -perm +1' should produce what you are looking for. > > >Scott McMillan Oops, sorry, make that 'find /home -perm +111'. My previous post would find files with u+x set, not any others. I should learn to slow down when I'm typing ;-) Scott McMillan |
| |||
| On Thu, 13 May 2004 15:23:09 GMT, "alex" <alex@hotmail.com> wrote: >root@aeshells.com:~# find /home -perm 1 >root@aeshells.com:~# find /home -perm 111 >root@aeshells.com:~# > You are missing the '+' in front of '1' and '111'. 'find /home -perm +111 ...' works on my Slack 9.1 with GNU find version 4.1.7 >nope, neithier of those work, the part that gets me is that is says in the >man page, "exact permissions" > <snipped> >--alex > Scott McMillan |
| |||
| alex wrote: > root@aeshells.com:~# find /home -perm 1 > root@aeshells.com:~# find /home -perm 111 > root@aeshells.com:~# > > nope, neithier of those work, you're forgetting the + sign: find /home -perm +111 -- Joost Kremers joostkremers@yahoo.com Selbst in die Unterwelt dringt durch Spalten Licht EN:SiS(9) |
| |||
| alex wrote: >> Oops, sorry, make that 'find /home -perm +111'. My previous post >> would find files with u+x set, not any others. > > perfect.. ! now... any way to make it ignore directories? find /home -perm +111 -type f man find -- Joost Kremers joostkremers@yahoo.com Selbst in die Unterwelt dringt durch Spalten Licht EN:SiS(9) |
| ||||
| > find /home -perm +111 -type f Thank you, Now how about a script that puts that out put to a file, compares it a previous output file, then email the differences to me then if the proper arg is given, have the same script, compare the output to a list of 'allowed' excutables in the /home. then automag- ically remove any that are not on the 'allowed' list... just kidding... i'll do the rest of the work my self, I much appreciate your, and everyones, help on this post, and a million other past posts. -alex |