View Single Post
Old 10-15-2012, 03:13 PM   #158
knc1
Embedded Cheerleader
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: 6,510
Karma: 5840130
Join Date: Feb 2012
Device: Too many.
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