Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am pretty inexperienced with Linux... So please bear with me here.

I keep running into permission problems when working with truecrypt on Linux. Currently, I run truecrypt as root to mount my encrypted devices and containers. This all works fine, but I have to interact with the mounted volumes in the terminal as root, and I can't seem to use many of my applications on the files... Either because they can't be run as root or I don't know how to use them from the terminal. This seems really inconvenient to me.

How do people deal with this? Am I missing something, or is this just the way things have to be?

I am on Fedora 17 (KDE spin) now but I have this trouble with any distro I try.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

The problem is that the SUID isn't set with root ownership.

ls -l /usr/bin/truecrypt

On your system will give an output like:

-rwxr-xr-x 1 root root

To set the SUID type:

chmod u+s /usr/bin/truecrypt

Now 'ls -l' should look like this:

-rwsr-xr-x 1 root root

When an executable is given SUID permissions, whenever the executable is launched the resulting process will have the ownership of the owner of the executable, not the person launching the process.

share|improve this answer
    
If all you want is setuid, it's usually better to use chmod u+s FILE instead of, say, chmod 4755 FILE. This because if you use the u+s syntax, it won't touch any of the other permission bits. –  Michael Kjörling Oct 31 '12 at 9:22
    
Yes that might be true. But if he already touched the file this will set it to the default value and set the SUID. –  Nessuno Oct 31 '12 at 9:51
    
If the permissions were incorrect, it's unlikely (though not impossible) that by pure chance they'd be set to executable. In which case the OP wouldn't be able to mount the encrypted device in the first place, and the question would have looked very different. –  Michael Kjörling Oct 31 '12 at 9:53
    
Ok you are right thanks Michael. just changed it. –  Nessuno Oct 31 '12 at 10:01
    
Many thanks!!!! –  xcross Nov 1 '12 at 0:01

Your Answer

 
discard

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.