Recently I searched substitute for truecrypt and played a bit with cryptsetup. The steps I did:
mkfs -t ext4 /dev/sdb1
sudo cryptsetup open --type luks /dev/sdb1 enc_vol
sudo mount /dev/mapper/enc_vol /mnt
After that I (non-root user) can chdir to /mnt
and can see files but can't write anything there. Only root can write, but that is very inconvenient for me. As ls -l /dev/mapper/enc_vol
shows it is symlink owned by root and which points to /dev/dm-1
.
Commands like chown "username":"username"
and chmod 777
cannot change "root"ness of the beforementioned symlink to /dev/dm-1
.
My question: how can I mount LUKS partitions encrypted by cryptsetup to be able to write files in it being non-root user?