Guest User

Immutable on ext4

a guest
Aug 16th, 2017
284
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.70 KB | None | 0 0
  1. $ mount | grep " / "
  2. /dev/sda on / type ext4 (rw,noatime,errors=remount-ro,data=ordered,jqfmt=vfsv0,usrjquota=quota.user,grpjquota=quota.group)
  3. $ touch dont_touch_me
  4. $ chmod 000 dont_touch_me
  5. $ sudo chown root:root dont_touch_me
  6. $ sudo chattr +i dont_touch_me
  7. $ ls -l dont_touch_me
  8. ---------- 1 root root 0 Aug 16 14:20 dont_touch_me
  9. $ rm dont_touch_me
  10. rm: cannot remove ‘dont_touch_me’: Operation not permitted
  11. $ sudo rm dont_touch_me
  12. rm: cannot remove ‘dont_touch_me’: Operation not permitted
  13. $ sudo chattr -i dont_touch_me
  14. $ rm dont_touch_me
  15. rm: remove write-protected regular empty file dont_touch_me’? y
  16. $ ls -l dont_touch_me
  17. ls: cannot access dont_touch_me: No such file or directory
Advertisement
Add Comment
Please, Sign In to add comment