HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Stopping file deletion wth "find"
Operating System - HP-UX
1833309
Members
2845
Online
110051
Solutions
Forums
Categories
Company
Local Language
back
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
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- 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
05-06-2003 08:03 AM
05-06-2003 08:03 AM
Stopping file deletion wth "find"
If you touch a file called -i then anyone trying to delete a file in that directory will be asked for confirmation. Is there a similar way of stopping someone running a find command to delete files?
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-06-2003 08:13 AM
05-06-2003 08:13 AM
Re: Stopping file deletion wth "find"
A find command by itself doesn't delete files, it uses rm to do so. I would think the -i technique should still work. Have you tried it?
Pete
Pete
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-06-2003 08:17 AM
05-06-2003 08:17 AM
Re: Stopping file deletion wth "find"
Hi:
One thing you can (should) certainly do is to set the sticky-bit on the *directory* level. This allows only the owner of a file to delete it:
# chmod 1777 mydir
See the man pages for 'chmod' for more information.
Regards!
...JRF...
One thing you can (should) certainly do is to set the sticky-bit on the *directory* level. This allows only the owner of a file to delete it:
# chmod 1777 mydir
See the man pages for 'chmod' for more information.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-06-2003 08:22 AM
05-06-2003 08:22 AM
Re: Stopping file deletion wth "find"
Actually, the -i thing DOESN'T stop anyone from removing a file. If the user types in rm FILENAME, the file is removed regardless of whether or not a -i is in the directory. This is an old Unix hackers trick to slow down someone using rm *. Because -i will almost always be the first directory listed after . (dot) and .. (dot dot), the rm command interprets this as an argument, rather than the file that it really is.
The answer to your question is you really can't protect users from themselves. Hopefully, you don't let them have any privledged accounts (like root) where they can do any real damage. If a user is smart enough to use the find command, they'll also find a way to delete a file using it.
Chris
The answer to your question is you really can't protect users from themselves. Hopefully, you don't let them have any privledged accounts (like root) where they can do any real damage. If a user is smart enough to use the find command, they'll also find a way to delete a file using it.
Chris
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP