View Full Version : fstab network mount
14th May 2004, 06:10 AM
I'm using Fedora Core 1.
I would like to mount a windows shared folder at fstab and allowing normal user to have read-write permissions.
I have tried
//192.168.0.1/linux /mnt/my_network_share/linux smbfs username=myusername,password=mypassword, default 0 0
//192.168.0.1/linux /mnt/my_network_share/linux smbfs username=myusername,password=mypassword,rw,uid=roo t,gid=root 0 0
Both of them will mount the drive, but normal users won't be able to write? How to i make it with write permission? What am i missing?
14th May 2004, 06:35 AM
I have a vfat partition on a local drive mounted with fstab that I wanted full access to, logged in as either root or with my user account. There are no other user accounts so I was able to use just this option string:
root always has access, so you don't need any of the "root" entries, and "default" I think conflicts with trying to allow user access, among other things.
The umask=0002 sets the permissions for all files on the drive (partition in my case) to rwxrwxr-x, and it defaults new files to the same. You can change the permissions when you move files to another location. If you change the permissions and leave them in the same location, they get changed back to rwxrwxr-w when you mount the drive again at the next boot. Since Windows doesn't use the same permissions, this is the way you are telling Linux what to use on Windows files. I think using the "default" option set permissions to r-xr-----, or something else very limited. You can try a man umask to get more info on it, or post back the permissions you would like it to use and someone will give you the correct number to use.
With the user account set to be the owner, the user can stay the owner, or root can change the ownership after the file is moved out of the mounted drive. You can't change the owner to root while it is still in that mounted location because the uid=myusername makes that the only acceptable owner there.
14th May 2004, 07:50 AM
sounds so complicated. mind to post a working sample?
and i am suppose to mount it to lot's of users. so uid=myusername is only for 1. how to put say 20 ppl. can i only just put the gid and not uid?
thanks for replying :)
14th May 2004, 08:18 AM
If you have a group that they are all in, then gid=name_of_group should work also, since the permission setting with umask=0002 is rwx for group and/or user.
My entry is for a local drive partition, so I can use vfat for the type, and I don't need username/password like I guess you do with the Samba network share. Mine is:
dev/hdc3/ /mnt/LinTrans vfat uid=jrittvo,umask=0002 0 0
So you might want to try:
//192.168.0.1/linux /mnt/my_network_share/linux smbfs username=myusername,password=mypassword,gid=groupn ame,umask=0002 0 0
The files would be owned by root once they were in that location, since no owner is specified and it uses root as the default owner, but they would be read/write/exec by anyone in the group you name. Just make a group if you need to with only those people that will access the drive.
14th May 2004, 09:09 AM
Check this post fstab-rw (http://www.fedoraforum.org/forum/showthread.php?s=&threadid=1624)
14th May 2004, 04:42 PM
thanks for replying
now i can read and write as a normal user (uid=500, gid=100)
//192.168.0.1/linux /mnt/my_network_shares/linux smbfs username=myusername,password=mypassword,uid=500,gi d=100 0 0
permission for /mnt/my_network_shares/linux
therefor other users in my group (gid=100) can't seem to write.
how do i allow users from my same group to write? i had try put umask=0002 and umask 000 but don't seem to work. i had even try to set smbfs to vfat but it seems to hang on boot. the network share is a ntfs.
Gaithersburg Travel Photos on Instagram
- Harelbeke Instagram Photos
- Diamond Harbour
vBulletin® v3.8.7, Copyright ©2000-2014, vBulletin Solutions, Inc.