How to mount as normal user?

I would like to mount drives as my regular user, not root. However

mount: /mnt/ssd1: must be superuser to use mount.
mount: /mnt/ssd2: must be superuser to use mount.
mount: /mnt/ssd3: must be superuser to use mount.

I’ve also added the “user” flag to fstab bit to no avail. One reason I want this is I mount it with sudo then the file system own is root:root, and my script fails to write to it.

which part of your script failed

The part that tries to write to the mounted drives. Because it’s owned by “root” and not the current user. I can mount it as root (using sudo) and then do a chown -R user:user /mnt which works, though does seems a little bit of a hack.

Show me the code…

I have this and work in fstab network drive :slight_smile:

//xxx.xxx.xxx.xxx/data /mnt/data cifs id=1000,credentials=/home/user/.smb,iocharset=utf8,noperm 0 0

But harddrive

UUID=75c5a97d-29d4-4516-a4ab-a746cb8s556 /mnt/Data ext4 defaults 0 0