When you mount your vfat partion you can pass a uid and gid option to set the userid and groupid the filesystem will be owned by. You can also set a file and directory permission mask. If the filesystem will be used by several people consider creating a group and adding yourself as a member.
Your fstab should look something like this.
/dev/sdb1 /mnt/v1 vfat noauto,user,uid=blah,gid=blah 0 2
and your mount command would look like this.
mount -t vfat /dev/sdb1 /mnt/v1 -o uid=blah,gid=blah
You may also want to look at installing the pmount package to make mounting filesystem as a user easy.
Answer to questions in the comments.
1) is the fstab necessary also when I
use the mount command?
If you want a user to be able to mount the command without using sudo, then yes.
2) do I have to be root for the mount
command you gave me?
You could remove the noauto from the fstab, and the filesystem will be mounted at boot time. Or as a regular user they can mount with a command like mount /mnt/v1.
3) How do the changes in fstab become
active?
Since you have used noauto, nothing will happen automatically. The entry just allows a user to be able to mount the fileystem.
Just to map a network share directory you would use this command:
net use \\Server\ShareName\Directory
This mapping would:
- not be persistent
- would have to be established and authenticated at user login
- you would access the share using the UNC path, and not a local drive letter
If you want to access the network share through a location on your local C:
drive, you'll want to set up a symbolic link:
mklink /d C:\Folder\ShareName \\Server\ShareName\Directory
Now when you navigate to C:\Folder\Share
you'll see the contents of \\\Server\Sharename\Directory
. You'll still need to provide authentication for the resource with something like net use
(or just be logged into a domain account on a domain system that has access) otherwise the link will probably error out angrily.
Best Answer
You can use the subst command in Windows.
To make a persistent redirection, you can edit the registry. Add a string (REG_SZ) value to:
Set the name of the value to the drive letter (e.g. M:), then the data to:
This method will work across logins and reboots. I tested this on Windows 2008, so it should also work on Vista, XP, 2003 and 2000.