2

/home normally contains files created by a user (e.g. text files, pdf, mp3, mp4,...), and files (mostly user-specific) created by some program (e.g. .emacs, .mozilla, .bashrc, ...). Is it better to create another partition to store all the files created by a user, to separate them from files created by programs in /home?

Does the separation have the following benefits:

  • Backing up changing files can create corrupted files in the backup. in /home, programs may be changing some user-specific files without user's notice. If we only need to back up user-created files, then backing up will not be affected by those programs?

  • does putting user-created files and program-created files in /home risk that programs might delete user created files accidentally?

    For example, Windows running under virtualbox under Ubuntu created a big file in /home. If there is something wrong with virtualbox, Windows, or some program running inside Windows, is it possible the user created files elsewhere in /home might be modified?

    Are there other examples that programs more likely accidentally modify user-created files?

What drawbacks can the separation of program-created and user-created files into /homeand another different partition have?

Thanks!

  • First of all, the programs that run on your machine do NOT care about partitions. Linux is responsible for mapping ALL partitions and virtual file systems into ONE single directory tree, starting at / (file system root). This is different from Windows, as you have no C:\, D:\ etc. A program does just access the files in the file system tree, while the Linux kernel maps the tree to the partitions. So if you want to stay with the default directory hierarchy (recommended), moving e.g. /home/MYUSER/Music/ to a different partition and mapping that over the old one changes nothing. – Byte Commander Feb 27 '15 at 12:13
  • @Byte: thanks, but I don't understand how mount points you mentioned can influence my partition design? – Tim Feb 27 '15 at 12:34
  • You might want to inform yourself a bit about the linux file system? thegeekstuff.com/2010/09/linux-file-system-structure and bleepingcomputer.com/tutorials/… could maybe be interesting for you. Linux creates a totally virtual file system tree at boot with the default structure (folders /bin, /home, /root, /usr, /etc, /var, /tmp and so on). Then it looks for the partitions set to automount and replaces the virtual branch of the file system tree set as mount point with the partition's content. Got the idea? – Byte Commander Feb 27 '15 at 12:42
  • @Nodak: what punishment? – Tim Feb 27 '15 at 16:12
5

As long as you always mount your separate data partition I can see little if no benefits for the security aspects you mentioned.

Any mounted partition including your data partition can be written to by you and by all your applications in case you had the appropriate permissons. A virtualised Windows will however only be able to access you data in case you had defined a shared folder or network access (the big file it creates is a closed virtual hard drive container).

Still, there may be cases where splitting our HOME and a dedicated data partition may be useful.

Examples:

  • have a shared partition accessible to other users using ACL
  • have data that should only be read but never be written to (mount as read only)
  • ease maintaining a different backup strategy for data vs. application settings (but this can also be done without a dedicated data partition)
  • access data from different Linux distributions or releases in a multi-boot setting where application settings should not be shared
  • have your OS and HOME on a small SSD but want to keep big files (virtual machine disks, videos, music, pictures) on a large conventional drive
  • store sensible data in an encrypted partition when you do not need an encryption of all of your home
  • Personal video, music etc. files are not big data. – leftaroundabout Feb 27 '15 at 15:37
  • @leftaroundabout LOL so true, but they are big files ;) – Takkat Feb 27 '15 at 15:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.