Glam Prestige Journal

Bright entertainment trends with youth appeal.

Is there any way to create to a file that root user also cant delete?

0

2 Answers

It's possible only with hardware-restricted write capabilities.

But if you want prevent some files from being accidentally deleted e.g. with

rm -rf /some/dir

Try to set immutable attribute:

: ~ $ touch immut
: ~ $ sudo chattr +i immut
: ~ $ sudo rm immut
rm: cannot remove 'immut': Operation not permitted

Root privileges are the powers that the root account has on the system. The root account is the most privileged on the system and has absolute power over it (i.e., complete access to all files and commands).

Nothing is impossible for a root user to do. There is no way To do that.

: ~ $ touch immut
: ~ $ sudo chattr +i immut
: ~ $ sudo rm immut
rm: cannot remove 'immut': Operation not permitted

But admin still return attributes back

: ~ $ sudo chattr -i immut
: ~ $ sudo rm immut 

done!!!

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy