- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: find SUID executable file excluding nfs file s...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-10-2006 03:48 AM
04-10-2006 03:48 AM
find SUID executable file excluding nfs file system...
I'm trying to find the SUID executable files on the entire system... but it still goes throught the nfs filesystem and give me this "find cannot open..." I want to avoid this in my logs... SO I tried this:
find / -type f -perm -04000 ! -path "/dirnfs1/*" ! -path "/dirnfs2/*"
I also tried replacing -path by -name... Got the same thing...
The file are printed... but I also have a lot something like 30000 line of "find: cannot open... /dirnfs1... "
Anyone have an idea???
Jonathan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-10-2006 03:55 AM
04-10-2006 03:55 AM
Re: find SUID executable file excluding nfs file system...
You can skip NFS filesystems by adding '! -fstype nfs' to your 'find':
# find / ! -fstype nfs -type f -perm -04000
See the manpages for 'find' for more information.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-10-2006 05:07 AM
04-10-2006 05:07 AM
Re: find SUID executable file excluding nfs file system...
find: cannot open /uc_nfs_webspool_RO/fsprd/psreports/021609331179FA2DF75BD8A8E4AA292478F572CE7BDC7
0EE4ECB2756BF5C36C06930362A9FD163B0F179900371A3BE
This fs is automount...
Any idea why?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-10-2006 05:11 AM
04-10-2006 05:11 AM
Re: find SUID executable file excluding nfs file system...
It may be done with a script that check also that the fs is not remotley mounted (ie first field does not contain a ":").
Regards.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-10-2006 06:33 AM
04-10-2006 06:33 AM
Re: find SUID executable file excluding nfs file system...
find / ! -local -prune -o -type f -perm -4000 -print
should do what you're looking for.
HTH;
Doug
------
Senior UNIX Admin
O'Leary Computers Inc
linkedin: http://www.linkedin.com/dkoleary
Resume: http://www.olearycomputers.com/resume.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-10-2006 06:53 AM
04-10-2006 06:53 AM
Re: find SUID executable file excluding nfs file system...
your find command probably looks into a directory which holds references to files that for some reason are not present.
If you cannot correct the error you can at least suppress the error messages by redirecting std. err. Try appending
2>/dev/null
to mr. Ferguson's suggestion.
regards,
John K.