How to prevent command from deleted

Hi,

I've been searching around for solution, hope that some gurus here can help.

I'm using some commands in my shell script and I'd like to protect these command to be moved to another directory. For instance, cp currently in /bin/cp. If I move it to /bin/cpxxx, my script will not be able to work as it give "command not found error" . How can I prevent it from happening?

Only root should be able to move things around in there, and root should be smart enough not to break his/her system...

Thank you for the prompt reply.

This is in the event that the system is being hacked into and hence I'd like to the script to be able to send notification once it has been moved. Anyway to protect that?

Hi Gklntn,

Did you said hacked? - Then it's time to tighten your security. And, first and foremost, change the root password :wink:

However, the best thing I would suggest to implement "auditd - The Linux Audit daemon".

Let us know if it helps or else you need some more assistance on this.

Br,
VB