# truecrypt and root privileges

## rikell42

I just started to use truecrypt and I think it is wonderful. Its easy to use and does the job better then anything else I have tryed. 

I do have one problem. I can't seem to mount a volume without being root.

I get this error message 

```

rikell42@tux ~/test $ ls

dir  dogs.mpg

rikell42@tux ~/test $ truecrypt dogs.mpg dir/

truecrypt: Administrator (root) privileges required

rikell42@tux ~/test $                                   

```

dir is just a empty directory I made to mount the volume 

and dogs.mpg is my encrypted file

I don't know if it matter but it may be related. I aslo can't figure out how to mount a cd image with the -o loop  command with out being root. Maybe they have the same cause.

----------

## Non_E

AFAIK this behaviour is normal. Users can not mount anything without prior setup. You may consider using sudo.

----------

## leynux

After mounting as root, I was unable to CHMOD /CHOWN the files inside to normal user

after chown, normal user still cannot write to the truecrypt mount point.

----------

## Non_E

 *leynux wrote:*   

> After mounting as root, I was unable to CHMOD /CHOWN the files inside to normal user
> 
> after chown, normal user still cannot write to the truecrypt mount point.

 

Try:

* Su to root

* Map the volume with truecrypt (eg. truecrypt -N1 /dev/your_encrypted_device)

* 

```
mount /dev/mapper/truecryptN /mnt/somewhere
```

* 

```
chown -Rc your_user:some_group /mnt/mounted_truecrypt_drive
```

If something goes wrong, paste error messages in this thread.

EDIT: Then you may exit the root shell and try to access the files as your normal user (I suppose it is the user you chown the files to). Should you still be unable to acces the files for writing, check permissions.

----------

## chrissou

I'm trying your solution but chown didn't work and i didn't access write mode with my truecrypt partition ...

Thanks a lot

----------

## afabco

so in order for truecrypt to be of any use, a user has to be able to root?

surely not...?

----------

## ronmon

I made an alias in my normal user's ~/.bashrc to simplify mounting and unmounting my truecrypt volume.

```

alias con="sudo truecrypt /home/v /home/m && \

            sudo chgrp adm /home/m && \

            sudo chmod 770 /home/m"

alias cof="sudo truecrypt -d"

```

That's for a user in the "adm" group and requires editing of sudoers, of course. I get a prompt to enter the truecrypt password and everything works.

----------

