Guest User

Untitled

a guest
Jul 29th, 2016
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.98 KB | None | 0 0
  1. /ILYA/Music/W.A.S.P/1984 - W.A.S.P/01 - I wanna be somebody.flac
  2.  
  3. p='/ILYA' && sudo chown -R root:root "$p" && sudo chmod -R =r,u+w,+X "$p" && chown user "$p"
  4.  
  5. p='/ILYA' && sudo chown -R root:root "$p" && sudo chmod -R =r,u+w,+X,+t "$p" && chown user "$p"
  6.  
  7. p='/ILYA' && sudo chown -R root:users "$p" && sudo chmod -R go-w "$p" && sudo find "$p" -type d -exec chmod a+t,g+w "{}" ;
  8.  
  9. p='/ILYA' && sudo chown -R user:users "$p" && sudo chmod -R a-t,g-w "$p"
  10.  
  11. p='/ILYA' && sudo find "$p" -type f -exec chattr +i "{}" ;
  12.  
  13. p='/ILYA' && sudo find "$p" -type f -exec chattr -i "{}" ;
  14.  
  15. $ touch file
  16.  
  17. $ ls -l file
  18. -rw-r--r-- 1 user user 0 Jul 29 20:42 file
  19.  
  20. $ lsattr file
  21. ---------------- file
  22.  
  23. $ sudo chattr +i file
  24. $ lsattr file
  25. ----i----------- file
  26.  
  27. $ rm file
  28. rm: remove write-protected regular empty file `file'? y
  29. rm: cannot remove `file': Operation not permitted
  30.  
  31. $ sudo rm file
  32. rm: cannot remove `file': Operation not permitted
  33.  
  34. $ sudo chattr -i file
  35.  
  36. $ rm file
Add Comment
Please, Sign In to add comment