Google Site SearchFN Site Search FN Blog Login FN Blog Login
Site Navigation:

Mount a remote share as a nonroot user

by Daniel Owen on February 23, 2004

One of the more annoying things about mounting remote shares is not having write access to them as your normal user. Su-ing to root to move or copy files becomes obtrusive. The following information shows how to mount a remote share as your normal user. This gives your account read/write permissions to the share.

Edit your /etc/fstab entry for your remote share to look like this. In this example I'm using an samba share. The text in red should be changed to your specific information.

//some-server/remote-share /home/user/mountlocation smbfs noauto,rw,username=username,workgroup=yourdomain,uid=user,gid=user 0 0

You will still be required to mount the share as root. Afterwards your user should be able to write to the share. Using the "user" flag to allow a normal user to mount will not work in conjunction with this method of mounting.

-Daniel Owen