I used to get this same problem and searched the net and tried everything others had. I was on a Lenovo 64 bit laptop (T410) running Windows 7. I had a separate logical drive and was encrypting the entire drive. The HDD on my laptop is a 500gb, 150 odd for my C drive and another 350 odd for my X drive. I encrypted my entire X drive (logical drive).
True Crypt was working fine and then suddenly one day after using it for about a month, it just would not mount and kept telling me the password was wrong (the password was not wrong).
I actually deleted the partition and started all over again. And it worked fine for a few days and then i had the same issue again.
anyway i tried everything but eventually i got it working by changing my drive letter for the mount.
I suspect that something i installed was locking up the partition so when i changed the drive letter from x to s it suddenly started working again. I changed this in My computer, Manage, Disk Management, right click on the drive and then change the drive letter.
Hope this helps others who may have had the same issue.
One option would be to set the the SUID bit on veracrypt. This would make sure it took on root privileges whenever run.
# chmod u+s /usr/bin/veracrypt
Generally, however, I try to avoid the SUID or SGID bits, as they allow any user with permission to execute the binary to use it at elevated privileges.
A better option:
Another option you have if you've got sudo
is to create a group with password-free sudo privileges for veracrypt.
This is definitely a still a little less secure than always requiring a password, as is always the case when creating sudo rules like this. Make sure you read this carefully and understand what it entails to ensure you do not create a security risk!
Before you begin, you want to ensure that the /usr/bin/veracrypt
binary is not writable by group or other.
Confirm that it is not writable by another other than the owner:
$ ls -lha /usr/bin/veracrypt
-rwxr-xr-x 1 root root 7.1M Sep 11 2019 /usr/bin/veracrypt
First, create a new group:
# groupadd veracrypt_group
Next, add your user(s) to the group:
# usermod -aG veracrypt_group your_user
Now you now use visudo
to create a new sudo rule:
# visudo -f /etc/sudoers.d/veracrypt
This one will allow the veracrypt_group
to run /usr/bin/veracrypt
without a password.
%veracrypt_group ALL=(root) NOPASSWD:/usr/bin/veracrypt
Best Answer
That corruption may happen if you disconnect your drive before all of the data was written. TrueCrypt acts as a middleman, encrypting/decrypting data on the fly as it is read/written. It does not affect the way your OS or programs write to the disk.
So, if some program write()s a lot of data without flush()ing, and you disconnect that external hard drive, some data may be not fully written at that moment. But it has nothing to do with TrueCrypt.
If windows, or the program you are using doesn't treat removable media in some special way, then there is no difference how you mount that drive (beyond those pesky folders).