lainchan / Ω

(untitled)

Apoc · 2019-02-20 22:20
https://static01.nyt.com/images/.bash_history Can someone explain how a .bash_history file would end up in the images directory?
Appleman1234 · 2019-02-21 00:14
Firstly, webroot directory or web documents directory isn't the same as specify directory on the filesystem, it is a customizable value in a configuration file. Secondly, $HISTFILE is where bash writes its history file and whilst this defaults to ~/.bash_history it can be set to a custom value directly on in .bashrc .
Ishikura "Tatsu" Tatsuhiko · 2019-02-21 15:49
At least he uses vi.
Koos van der Merwe · 2019-02-21 16:19
>>15804 is it safe for new york times bash history to be available like that
Unnamed · 2019-02-22 01:58
>>15805 Most websites hide the bash history file because it usually contains important things. While in this particular case nothing too damaging is in it, it's still bad to have it here because it could just as easily contain a password or something.
Turner · 2019-02-24 16:41
>>15797 But why would you set HISTFILE to live somewhere within the web root? If intentional what is the advantage and if unintentional what would you be doing where that would happen by accident? The only things I can think of are if it's in a container of some sort with only one user and limited directory structure, or if somebody just rsync'd their entire home directory (seems like a bad idea).