Just to clarify for others as I've stumbled on this question when first searching for it on Google:
Issue: After doing all the necessary setup for a LUKS container file/harddisk that is already mounted with root, a user account has not write privileges to it, only read. (this is the case for most tutorials and instructions above)
Solution:
We need to change the permissions of the newly-minted filesystem that is in the encrypted harddisk/file container.
Using the example in the example where /dev/mapper/$name
has already been mounted to /media/mount_point
with a command like:
sudo mount /dev/mapper/$name /media/mount_point
Open a terminal in your account and type enter this command:
sudo chown -R yourUserName /media/mount_point
For example if joe has a mount point named myEncryptedHD he should do:
sudo chown -R joe /media/myEncryptedHD
What this does is Joe changes the owner of all files in myEncrypted
to joe
, and he now has read and write access. Life is good.
If you decide you don't want R/W permissions anymore, just sudo chown -R root /media/mount_point
and you'll revoke your rights.
References for chown examples for more complicated permissions handling and a related question on SuperUser with a comment on the answer that also suggests the alternative sudo chmod -R 775 /media/mount_point
that will set read write execute permissions on user, group and only read and execute (5) for others. A chmod man page for further info