Have a external disk with Lucks and EXT4 partition, the OS mount the disk using the first user by default but can not mount as secondary user:
The first user is uid=1000 and gid=1000, but the secondary user is 1002.
This mount fine:
sudo mount -t ext4 -o nosuid,nodev,nofail,x-gvfs-show,noauto /dev/mapper/luks-b86d3d42-... /mnt/disk
But is mounted with 1000 user permissions, the command is executed from secondary session.
When try mount with specific user says:
sudo mount -t ext4 -o uid=1001,gid=1001,umask=0044 /dev/mapper/luks-b86d3d42-... /mnt/disk
mount: /mnt/disk: tipo de sistema de ficheros incorrecto, opción incorrecta, superbloque incorrecto en /dev/mapper/luks-b86d3d42-..., falta la página de códigos o el programa auxiliar, o algún otro error.
How to mount correctly?, I use Ubuntu 22.04 LTS.
2