1

I have a new build of 14.04. I installed the system on a 128GB SSD and have a 1TB HDD on board as well. This machine will have either two or three users.

Ideally, I would like to use the HDD as storage for the various media files of each user, but where users cannot access one another's stored files. As it sits now it is only accessible to one user.

I'm a bit of an idiot when it comes to drives, but my thinking is that I need to create a separate partition for each user and mount only that partition when a given user logs in. Am I close? And if so, how might I go about doing this?

3

Nope, you don't have to create a partition for every user, instead you just have to move your old /home to your external HDD.

By default /home is the place for all user files unless "root" though your user files normally will sit here.

For case of permissions by default users can see other files without the ability of changing or modification, if you also want to remove the read permission then easily you can change permission of each user home using chmod command. For example suppose I have a user named test.

$ ls -ld /home/test

drwxr-xr-x 40 test test 4096 Jul  1 14:00 /home/test/

This is the default permissions of user test home and as you can notice it have r-x for others and hence other users can list files in other's home and can read those files.

If you want to prevent users from reading others user's files.

sudo chmod o-rx -R /home/test/ 

Now let's make sure:

$ ls -ld /home/test/

drwxr-x--- 40 test test 4096 Jul  1 14:00 /home/test/

read my asnwer https://askubuntu.com/a/638799/150504 for more information about permissions.

Now how to move old /home to new path(hdd)?

Take a look for my answer here: https://askubuntu.com/a/643445/150504

2
  • This is a really great answer and I gave it an immediate upvote. What I am wondering is whether this is more or less efficient than simply creating new folders on the HDD for each user's media files and then using symbolic links to make them seem as if they are in the user's /home folders. The only issue that comes up for me in that scenario is how to keep the HDD from showing in each user's Nautilus.
    – Blind Fish
    Jul 4 '15 at 17:14
  • Symlinks is a good option but it's better as described above in case of hard drive damage! You can still have your data
    – Maythux
    Jul 6 '15 at 5:51

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.