USB Drive permission questions

YANNQ (Yet Another Newbie Question)

I looked in the forum and elsewhere and I’m still having problems creating the correct permissions to access a USB drive I want to use to backup my box.

I used Disk Partition Manager (I’m using KDE) and I see the partition. However, I only have root access to it.

Can someone help me set up user access?

Thanks and sorry for a question that has been probably asked and answered many a time!

1 Like

I guess you would need take ownership of the mountpoint where it gets mounted in the filesystem.

Example:

sudo chown USER: /path/to/mountpoint

Replace USER with your real username.

1 Like

Try sudo chown -R username:username /path/to/drive

Thanks both, I did. I still don’t have privileges.

1 Like

What is the output of ls -la /path/to/drive

Yup, it’s still root:

brw-rw---- 1 root disk 8, 49 Oct  4 10:07 /dev/sdd1

But where is it mounted cause /dev/sdd1 is supposed to be owned by root. Where is the mountpoint?

/run/media/USER/ followed by an insane string of numbers and letters

I advice you to just use /etc/fstab to mount the drive. Here is how I mount my usb drive in fstab:
UUID=c3d75b82-765d-4924-accc-d23cd3c938ef /mnt/ToshibaHD ext4 nofail,x-systemd.device-timeout=1ms,defaults,noatime 0 0

Use the UUID for your drive, you can find it withe this command: sudo blkid
Make a folder somewhere in your home directory to mount the drive or in /mnt but if you do in /mnt change the ownership to your username. If the drive is not formatted with ext4 then that option should also be different.

The nofail option is to make sure that even if the drive is not connected there wont be an error. So unmount the usb drive and modify your fstab and before you reboot check if everything is ok with sudo mount -a

Your drive should now mount at the given mountpoint.

3 Likes

Thanks everyone for bearing with me :slight_smile:

1 Like

If the mount point is under /run/media/USER/ then it isn’t a mount point permissions issue.
How is the USB drive formatted? by which I mean is it ext4, ntfs etc.

Glad everything worked out.

That’s what the forum is mostly for, helping each other.

1 Like

I chose a quicker, dirtier route. I reformatted the empty drive with everyone as an option and bypassed the root only access. But I learned a lot.

As to your question, I wasn’t sure which extension to use, BRTFS, EXT4, etc. I chose the later. I don’t care about exporting it, although as I say this, it’s big enough to have a Vorta backup and a manual uncompressed one.

Not sure if that answers your question. Thanks

Ah yes, IIRC on blank ext4 I usually end up doing a chmod to relax permissions.
Good to know that you’ve solved the issue.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.