how to allow non root users to access readonly drive?

Red Squirrel

No Lifer
May 24, 2003
70,164
13,571
126
www.anyf.ca
I need to be root to mount drives, so I do so as root, but then only root has access. How can I allow any user access to a mounted local drive?

Not talking about fstab mounted drives, but if I use mount command.

Tryuing to backup files on a crapped out windows box so I loaded a ubuntu disc, mapped a network share no problem, but can't seem to mound local drive. Did it as root, but can't access as user, and I can't figure out how to mount network drive in command line on that distro. normally its mount.cifs or mount bot neither work. So I'm kind of stuck here. i tried to do chmod 777 on the mount folder, but since its ready only, it wont work.
 

jhu

Lifer
Oct 10, 1999
11,918
9
81
if you know what the drive's filesystem is before hand you can put the following in your '/etc/fstab' file:

/dev/<device> /<mount point> <filesystem> ro,user,noauto 0 0

now anyone can mount the device