They don't care that this makes their installation less secure, because they are convinced that it makes things more secure. shrug
They don't care that this makes their installation less secure, because they are convinced that it makes things more secure. shrug
* https://www.pathname.com/fhs/pub/fhs-2.3.html#OPTADDONAPPLIC...
* https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#op...
You mean because that's obviously way more sane than spewing the installation of every piece of software all over the system.
There's a reason it's basically only Unix that works like that. Slightly disappointing that you were directly confronted with the problems of the FHS but still think it's better... because customers are idiots or something.
> There's a reason it's basically only Unix that works like that.
I think you're underestimating how common it is for software on both Windows and macOS (the former more than the latter) to spew its bits all over the system. In the case of Windows especially, this includes things like the Registry and events sent to Event Viewer.
You can only use language specific packager managers like npm and pip3 if you install into a specific sub directory outside of OS file hierarchy conventions.
I'm quite fond of the path of least surprises.
Splitting an installation across multiple locations has additional benefits. It's a good thing that the application user can't modify the binaries (which is pretty much enforced when the binaries live in /usr). You can achieve the same thing when dumping everything in /opt/$foo, but that's pretty much the worst of both worlds imo.
Why?
> It's such a rare and risky use case that it warrants a barrier normally being in place.
Users installing software is a rare use case? Ok.
macOS has /Applications, /Library, their equivalents under the user's home directory, applications that ignore macOS conventions and use XDG ones...
Windows has AppData in three variations, Program Files, Documents...
Android has /Android/data, apps that stick stuff in /storage/emulated
What Unix does is mix up the contents of all the apps themselves. All app binaries are in `/usr/bin`. All libraries are in `/usr/lib`. All their data is in `/usr/share`. No other OS does that as far as I am aware.
How are others systems doing it?
On Mac this is the app bundle. On Android it's the unzipped APK. I think NixOS does this too but I'm not too familiar with it.
Even Windows more or less does this - all the data is in c:/Program Files/The App. Well at least in theory. Windows is pretty messy.
And so you have to make just about everything in the package relocatable. Good fun.
I wonder if we could have a rework of the classic layout where we have /usr/share, /usr/<arch>/bin, /usr/<arch>/lib, /etc, /var/lib, /var/cache, and /tmp, but then inside those, enforce a rule that everything is in a subdirectory named after its package. So you would have dropped your stuff into /usr/x86-64/bin/elricsapp/elricsapp, /etc/elricsapp/elricsapp.conf, etc. Then the customer sysadmins could have simply created those directory, chown'd them to a new elricsapp user, and installed your software as a normal user.
You'd either have an astoundingly long-winded PATH and LIBPATH, or have some procedure for collecting symlinks to everything in /usr/bin.