View Single Post
Old 10-15-2012, 03:13 PM   #158
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by twobob View Post
ah sorry. : )

[root@[192_168_15_244] root]# touch /var/local/something_new
[root@[192_168_15_244] root]# chattr +i /var/local/something_new
[root@[192_168_15_244] root]# lsattr /var/local/something_new

[root@[192_168_15_244] root]# chattr -i /var/local/something_new
[root@[192_168_15_244] root]# rm /var/local/something_new
And if you had tried to rm /var/local/something_new after setting the 'i' (immutable) attribute you would have gotten a "permission denied" - even as 'root'.
Works for directories also, but I don't know what would happen if the start-up script got a "permission denied" error code.
I didn't see much error checking in that lab126 script you posted.
knc1 is offline   Reply With Quote