Veracrypt container on mac - how to set permissions (compatible with .ssh files)

784 Views Asked by At

I would like to know how to make the veracrypt volume (container) able to change permission with chmod (and have key permissions compatible with ssh).

I wish to store my .ssh folder securely with veracrypt. But when try to ssh using my credentials in a mounted veracrypt volume (using mac) I got an error: "Bad owner or permissions on xxxxxxx" and I cannot use ssh.

I tried to chown/chmod the files but it didnot work. All files have permissions "-rwxrwxrwx" for my user, even when I mount the volume in read only.

Is there a way t set the permissions properly or use a different FS for the container?

I tried a volume in exfat and fat from a file. I first tried with the GUI.

Then I tried this :

veracrypt /dev/sda3 /mnt/ssh --filesystem=none 
sudo mount -t exfat -o -m=022 /dev/mapper/veracrypt1 /mnt/ssh

and with fat :

veracrypt /dev/sda3 /mnt/ssh --filesystem=none 
sudo mount -t fat -o -umask=022 /dev/mapper/veracrypt1 /mnt/ssh

but chmod still failed :

mount: exec /Library/Filesystems/lfs.fs/Contents/Resources/mount_[exfat/fat] for /mnt/ssh : No such file or directory
mount: /mnt/ssh failed with 72

Of course the /mnt/ssh directory do exist ;)

Do I misuse mount ? Or missed some veracrypt options ? Or choose the bad filesystem ?

Thank you !

1

There are 1 best solutions below

1
On

Seem like choosing APFS works like a charm. And it's linux compatible.