View Single Post
Old 09-03-2015, 07:27 PM   #22
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Quote:
Originally Posted by susan_cassidy View Post
The Kindle processes will run as root, therefore, they can overwrite any file they want. You can't protect root from itself.
Have you ever tried saving a file on a linux machine in the same location where there is already a folder? Clearly not...
You'd have to know the folder might exist and make sure to clean up first.

But hey, try this out and see if you get a different result:
Code:
[eschwartz@arch /tmp]$ mkdir somedir
[eschwartz@arch /tmp]$ sudo bash -c "echo blah > somedir"
bash: somedir: Is a directory
[eschwartz@arch /tmp]$ sudo wget -O somedir www.google.com
somedir: Is a directory
I assure you, not only is it a very interesting PEBKAC-stlye error, it is also one currently used here to great effect in blocking OTA updates.


tl;dr
no one ever suggested the goal was stopping the root user from overwriting a file.

Last edited by eschwartz; 09-03-2015 at 07:30 PM.
eschwartz is offline   Reply With Quote