A independant mount point for home directory

I think there is a missing function in linux, being able to set an external of “/” mounting point.

A behavior I find problematic is the fact that “/” includes ALL the file systems, external hard drives and even FTP or SSH accesses.

If a virus manages to execute “sudo rm -rf /*” then all the disks of the computer will be affected.

It would be nice if Haiku is more protective and allows somebody to define an external custom mount point.
Example: home:// or my_files://

Highly doubt it’s going to happen now that the software world is concentrated on the Unix architecture.

Haiku is not linux

1 Like

I know but i think this behavior is the same.

I would like to have the possability to use password potected containers as home folder, so more then one user can use the system without watching thefiles if the other.

If a virus manages to execute code that can write to the filesystem, they will find a way to access all your disks anyway. It’s not uncommon on Windows to have ransomware which encrypts not only the local disk, but also any remote disk available on the machine. It’s very efficient for ransomware writers when they manage to do this to a computer in some company. Encrypting a single computer is not a big deal, encrypting a whole shared network drive with all the files from the company, however, can have consequences large enough that it’s worth paying the ransom instead.

So, I don’t understand what it would change to rename the mountpoints.

1 Like

A a point, you would have tell programs where to write things like your personal settings so you could even make it easier to target your personal data.

In Haiku no disks are mounted in “/”. Root file system is stored in RAM, created by kernel and can only contain directories and symlinks. Disk, from which system is booted, is mounted in “/boot”, other disks are mounted in “/<volume name>”.

I know, but a command like :
rm -rf /*
means destroying all the subdirectories ; this will include all the disks

But not in the hpkg files, they are read only. So you Lost your Settings, gut not the system Komponente

Test your theory first, because i am fairly sure rm -rf /* will find and delete the hpkg’s too.

So we should add a only admin piäriority or better add a password protection to the command

Well there’s a solution: Remove all these dangerous commands and make them available only on install CD. It won’t be handy for sure but, none can exploit something that is not there. :laughing: D

An ability to delete files and folders is always handy.
Also one can write and/or compile plenty different rm implementation.

rm -rf / et all are just an interface to the os, how they are interpreted depends on the OS, just because there is no direct way to delete all lettered disk on windows on the cli does not mean there is none at all.

In some cases we can do some stuff to help prevent accidentally triggering such stuff, good example would be FreeBSD extended flags that make system files undeleteable (like we could do this to our haiku.hpkg files), ubuntu’s --no-preserve-root is also an example one could do.
FreeBSD Securelevel preventing modification to mounted devices is also a good example of how to prevent silly mistakes like people using dd if=file of=/dev/wrongvdev to wipe their root disk

Although i think the heavy disinsentivising of the cli on haiku already acomplishes this somewhat (not many people know of evil stuff you can do with windows powershell either, even if it is powerfull ;)

(funnily enough rm -rf /* on standard unix will not remove all files… only rm -rf / will do that, because posix sais that * shall not match .*, so the correct command would be rm -rf /* /.* / :D)

edit: as far as i know, making a dir unreadable will prevent any tool from decending that way, and also rm i think stops on file system boundaries per default

Beyond the initial security question (of running rm -rf / from Terminal), imho this is a great idea where someone can separate home (put Haiku on one volume, put /home on another and link it together) or otherwise there could be a modular home folder (maybe even a sparse image) or a home share where different places could be pooled together as one ‘virtual’ home folder like how queries pool stuff together for searches kind of. That’d be really cool – the og BeOS had it’s features, this could be Haiku’s, Haiku could call it something like dynamic home folders!

Something like rmdir /S /Q \\.\ may work. Windows has filesystem root like Haiku, drive letters are just DOS compatibility. Windows real filesystem root looks like this.

1 Like