How to mount a drive for other user than root?
Posted
by
Ondra Žižka
on Ask Ubuntu
See other posts from Ask Ubuntu
or by Ondra Žižka
Published on 2012-09-20T20:17:53Z
Indexed on
2012/09/20
21:53 UTC
Read the original article
Hit count: 250
I've attached a SSD disk though USB. Then:
sudo su -
mkdir /mnt/hx
chown ondra /mnt/hx
mount /dev/sdb1 /mnt/hx # It's FAT32 now, but was the same with EXT4
The last command changes dir owner to root. Whenever I create a file in the root dir, I need to be root and root is the owner.
Can I set different user as owner of the mounted dir? Or, simply said, ensure that user XY can freely read/write on the drive.
© Ask Ubuntu or respective owner