Like the title says, is there a way to mount a partition (on boot or on login) for only one user, so that other users can't access the files but only me?
I searched for some fstab parameters but i found nothing I that would help.
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.Sign up to join this community
Depending on what file system you are using for the mounted partition you can use the mount options
gid=XX,uid=XXXX (group-id and user-id) - see
man mount for more information on what file systems support them. Users are listed in
/etc/passwd while groups are listed in
/etc/group. For your user, you can use the
id command. You can then set the umask-like options to set file permissions.
Here is an example of using them in
UUID=<xxxxx> /media/win ntfs rw,auto,nls=utf8,umask=077,gid=46,uid=1000 0 0
And here the same as a mount command:
sudo mount -U <xxxx> -t ntfs -o rw,auto,nls=utf8,umask=077,gid=46,uuid=100 /media/win
File systems that don't have
uid as an option, usually can have their rights set in the normal way after you mounted the partitionm i.e. recursively for all files with
chmod go-rwx -R /media/mountpoint (or what ever other mountpoint suits your fancy).