I managed to setup an encrypted partition that's mounted on boot using dm-crypt/LUKS.

The relevant entry from my /etc/fstab:

/dev/mapper/st_crypt     /media/st     ext4     defaults     0     2

The partition is mounted at boot, and I can write to it as root just fine, but I have no idea how to make it writable by a normal user (i.e the users group). Any suggestions?


If the filesystem on the device were FAT or NTFS, you could use the uid, gid, and umask options to set permissions for the entire partition. Since it's ext4, however, the permissions are stored for individual files and directories (FAT and NTFS don't have this feature).

If you just want to change the user and group for all the files and directories on the partition, you could do something like this:

chown -R user:group /media/st

The -R (recursive) option tells chown to apply changes to all files and directories contained within the specified directory.

  • Thank you. The following commands (on the mounted /media/st) did the trick: # chown -R root:users /media/st && chmod -R 775 /media/st – Bill Jul 18 '11 at 0:40

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.