Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have workstation with 160GB HDD capacity.
I have partitioned it with:

  1. 40GB -- for OS(Ubuntu) Installation
  2. 40GB -- for my personal data, and
  3. 80GB -- for all other (public) data.

I have installed Ubuntu 11.04 on 1st partition.

Confusion : How can i make 2nd partition (Personal data) visible and accessible to me (and root, of course) only.
All other programs and files need to be accessed by all the users, but those 40GB must be accessible to me (my account) and root.
How can I achieve this (or some alternate)?

Note : If referring to any link, then make sure it's easy to understand as I am very (very) new to Ubuntu.

share|improve this question
up vote 2 down vote accepted

It's rather easy to do: set the directory where your disc is mounted to your username and usergroup. Only users that are that username or are part of that usergroup and of course root will have access. So lets assume you gave this disc (during installation) a mountpoint called /discworld/. Log in with your admin-user and do...

 sudo chown $USER:$USER /discworld/

... and any other user should get an permissions error when trying to access this disc.

(where $USER needs to be replaced for the username you want this for unless it is the admin-user)


If you did not add a mountpoint during installation you can add one to /etc/fstab. If you got questions about how to do that ... search AU first and if no good results are found ask a question about it ;-)

share|improve this answer
Sorry for my idiocy, but what is mountpoint? – iOS App Dev Aug 31 '11 at 11:54
Remember during installation where you got to partition your discs? You choose names for your discs (like / for root). Those names are called mountpoints and are basically directories that hold the contents of a disc (is the disc not present the directory is empty; if it is present it shows contents of the disc). Example: /media/cdrom is a mountpoint for a cd ;) – Rinzwind Aug 31 '11 at 12:12
Oh... Windows calls these drive letters (F:, G: etc). Maybe that explains it better? Linux does not use that method but uses directories for that (and calls that a mountpoint). – Rinzwind Aug 31 '11 at 12:18
okay..., now getting some idea... – iOS App Dev Aug 31 '11 at 12:25
@Rinzwind : am I mistaken saying this won't work for a ntfs file system and the only solution for such a partition would be editing fstab to something like this UUID=XXXXXXXX /media/mydrive ntfs defaults,umask=007,uid=1000,gid=1000 0 0 – danjjl Aug 31 '11 at 15:42

In Ubuntu you'll have a problem if you only set the permissions of the files in this 2nd partition to youruser and root, because if you boot with a live-CD you'll automatically gain root rights.

So I would say you should try truecrypt on the 2nd partition, and encrypt it fully, then after starting the system, you can use your password to decrypt and use this partition.

For an English instruction refer to

  • Download Package at: Linux -> Standard (x64/x32)
  • Unzip this package.
  • Open terminal type:

    sudo sh path/to/unzippedcontent/truecrypt-7.0a-setup-x64

    (Where you have to replace path/to/unzippedcontent by your file specific path. And x64 by x64/x32.)

  • Follow installation instructions.

  • Start truecrypt by typing:

    sudo truecrypt
  • Follow the instruction in the tutorials given above.

share|improve this answer
+1 cuz it is the most secure way. But... this might be overkill but it certainly is not for the newbie user and requires a fair amount of knowledge of Linux/Ubuntu ;) – Rinzwind Aug 31 '11 at 12:20
Would it be suitable for daily use, i mean, encrypting and decrypting 40GB of data (say twice a day) wouldn't lower down system performance?? – iOS App Dev Aug 31 '11 at 12:30
Let's say, I will not be using live cd, then also this is a good option?? – iOS App Dev Aug 31 '11 at 12:32

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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