LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (https://www.linuxquestions.org/questions/linux-security-4/)
-   -   Mounted Truecrypt files let me just view them, and do nothing else (SUSE 10.3)! (https://www.linuxquestions.org/questions/linux-security-4/mounted-truecrypt-files-let-me-just-view-them-and-do-nothing-else-suse-10-3-a-595243/)

DeekBeek 10-28-2007 11:05 AM

Mounted Truecrypt files let me just view them, and do nothing else (SUSE 10.3)!
 
I think I've tried everything. I've used chmod u+s /usr/bin/truecrypt, and when I try to access my crypt file I get a "Failed to assign loopback device for file-hosted volume" message in return. I tried moving the crypt file off of an ntfs partition and onto my reiserfs partition, and the same thing happens.
I undid the situation with chmod u-s /usr/bin/truecrypt, then started using sudo (pre-cofigured with that nice new openSUSE 10.3 GUI configure sudo applet) or su to make truecrypt run as root. I could only look at the files in the crypt file, then, not read or write them; and I could only do so with konqueror running as root. I even tried chmod 777 -R on the mounted crypt file, while root, to no avail. I can only look at my truecrypt crypt files in SUSE 10.3, while root, can't write to them, can't move them. I put umask=0000 in fstab for the ntfs partition the crypt files are in, as well; no help.
I read that people using UBUNTU are using these truecrypt crypt files without a hitch (their forums are where I found all the help), but I can't do anything but look at the files in them as a root user. What am I doing wrong?

rednuht 10-28-2007 05:14 PM

how are you mounting the truecrypt drive and what is the output from the mount command ?
if you can provide a ls -al from the mounted device (feel free to obscure file names).
if applicable also provice /etc/fstab

jayjwa 10-29-2007 04:27 AM

You also might want to look at ecryptfs. I've had good luck with it.

DeekBeek 10-29-2007 11:37 AM

I am mounting my truecrypt drive with (obviously, replacing my real user directory with "deekbeek"):
Code:

sudo truecrypt /windows/d/files/data /home/deekbeek/d
The response is for truecrypt to prompt for the password, which I give, no other output.

Below is an ls -al. I can't touch anything with chmod as root, it just won't change.
Code:

linux-zzzz:/home/deekbeek/d # ls -al
total 42
dr-x------  1 root  root  8192 2007-10-28 14:00 .
drwxr-xr-x 31 deekbeek users 1536 2007-10-29 12:22 ..
-r--------  2 root  root  3061 2007-10-28 12:55
dr-x------  1 root  root    0 2007-10-21 15:33
dr-x------  1 root  root  4096 2007-10-21 15:33
dr-x------  1 root  root    0 2007-10-21 15:33
dr-x------  1 root  root  4096 2007-10-21 15:38
dr-x------  1 root  root    0 2007-10-21 15:38
dr-x------  1 root  root    0 2007-10-21 15:38
dr-x------  1 root  root    0 2007-10-21 15:38
dr-x------  1 root  root  4096 2007-10-21 15:38
dr-x------  1 root  root  8192 2007-10-21 15:30
dr-x------  1 root  root    0 2007-10-21 15:30
dr-x------  1 root  root    0 2007-10-21 15:30
dr-x------  1 root  root    0 2007-10-21 15:30
dr-x------  1 root  root    0 2007-10-21 15:30
dr-x------  1 root  root  4096 2007-10-21 15:30
dr-x------  1 root  root    0 2007-10-21 15:30
dr-x------  1 root  root  4096 2007-10-21 15:30
dr-x------  1 root  root    0 2007-10-27 13:16
dr-x------  1 root  root    0 2007-10-21 15:30
dr-x------  1 root  root    0 2007-10-21 15:30
dr-x------  1 root  root    0 2007-10-21 15:30
linux-zzzz:/home/deekbeek/d #


DeekBeek 10-31-2007 10:22 AM

Why do I do things the hard way?
 
I decided that I had corrupted my Truecrypt installation (which was from source code). I actually re-did my openSUSE 10.3 installation and then performed the one-click install of Truecrypt at the SUSE 10.3 repository. Now, it works fine, but non-root use isn't supported. Also, konqueror doesn't copy files in a mounted crypt file with drag 'n drop, but the good ol' command line cp works.
I was wondering if changing ftsab to umask=0000 instead of umask=0002 on my ntfs-3g partition, where the crypt files are, would allow the drag 'n drop...

DeekBeek 12-08-2007 04:16 PM

O.k., ignore the rest, but read this...
 
I think some of the Linux-afflicted out there were holding back. I wasted way too much time getting read/write access to my truecrypt containers (files) with Linux. Anyway, the key was in the content of the fstab file, and it contributed to the code below which actually works. The example below maps a truecrypt container file called data to a directory called d. Now I truly do share crypt containers between openSUSE 10.3 and Windows XP Pro (though I can only check the filesystem in the containers in Windows XP Pro, with chkdsk).

Code:

sudo truecrypt -u --mount-options user,users,gid=users,umask=0002 --filesystem ntfs-3g /windows/d/files/data /home/deekbeek/d
Alternately, I am able to open a Konsole and use SU to become root. Then I can use the following:

Code:

truecrypt --mount-options user,users,gid=users,umask=0002 --filesystem ntfs-3g /windows/d/files/data /home/deekbeek/d
Odd to me, but also true, I can map the same container after it is burned to a Dvd, replacing /windows/d/files/data with /media/dvdrecorder/data on the command line, the rest the same as above (read-only, of course).

GP72 05-16-2008 02:56 PM

Another solution to the TrueCrypt write issue
 
Seeing as I have found many answers in forums such as this, it is time that I made my contribution.

Like many others, I had issues writing to my TrueCrypt (5.1a) file on my Linux system (Suse 10.3 running off a PenDrive).

I tried

Code:

sudo truecrypt -u --mount-options user,users,gid=users,umask=0002 --filesystem ntfs-3g /SourceDirectory/TrueCryptFile /TargetDirectory/MountedTrueCryptPartition
but received the following error message:
Unknown option 'u'
Error: Incorrect command line specified.
I tried a bunch of other unsuccessful things.

For example,

Code:

sudo truecrypt --filesystem ntfs-3g /SourceDirectory/TrueCryptFile
yielded
Option 'filesystem' requires a value, '=' expected.
Error: Incorrect command line specified.
Or:

Code:

truecrypt --mount-options=user,users,gid=users,umask=0002 --filesystem=ntfs-3g /SourceDirectory/TrueCryptFile /TargetDirectory/MountedTrueCryptPartition
triggered a popup “Unknown option:user.”

I even tried typing “ntfs-3g” (and many variations thereof) into the Filesystem field of the TrueCrypGUI (Settings-Preferences-Mount Options-Filesystem) and just got the following popup:
mount:wrongfs type, bad option, bad superblock on /dev/loop0,
missing codepage or helper program, or other error.
In some cases useful info is found in syslog – try dmesg | tail or so
In the end, the following command line did the trick for me:

Code:

truecrypt /SourceDirectory/TrueCryptFile –filesystem=ntfs-3g
I hope this is of some help to those struggling with similar problems.


Quote:

Originally Posted by DeekBeek (Post 2984293)
I think some of the Linux-afflicted out there were holding back. I wasted way too much time getting read/write access to my truecrypt containers (files) with Linux. Anyway, the key was in the content of the fstab file, and it contributed to the code below which actually works. The example below maps a truecrypt container file called data to a directory called d. Now I truly do share crypt containers between openSUSE 10.3 and Windows XP Pro (though I can only check the filesystem in the containers in Windows XP Pro, with chkdsk).

Code:

sudo truecrypt -u --mount-options user,users,gid=users,umask=0002 --filesystem ntfs-3g /windows/d/files/data /home/deekbeek/d
Alternately, I am able to open a Konsole and use SU to become root. Then I can use the following:

Code:

truecrypt --mount-options user,users,gid=users,umask=0002 --filesystem ntfs-3g /windows/d/files/data /home/deekbeek/d
Odd to me, but also true, I can map the same container after it is burned to a Dvd, replacing /windows/d/files/data with /media/dvdrecorder/data on the command line, the rest the same as above (read-only, of course).


DeekBeek 05-17-2008 07:13 PM

I've always had to use two hyphens, i.e. --, before the filesystem and mount-options parts of the commands, and have always had to use a single blank space, never an = sign, following them. You may have syntax trouble if you use the lines GP72 does. Maybe it works with a distro other than Suse 10.3, though.


All times are GMT -5. The time now is 01:16 AM.