smbmount and group ownership
Posted: 11/24/2000 2:01:38 AMBy: Comfortably Anonymous
Times Read: 3,622
Likes: 0 Dislikes: 0
Topic: Linux
I had a problem with group permissions on smbmounts. I'd heard that to set the permissions needed, you simply modified the permissions on the mount point. However, as soon as the mount point was actually mounted, the permissions (Both user and group) would change to the user who actually did the mounting. Since only root can use the mount command, the mount ownership would change to user=root and group=root, so no other user could write to any of the files on the samba mount.
At the time, I had been using the following mounting syntax:
mount -t smbfs -o username=me,workgroup=NTDomain //NTServer/sharename /mnt/mountpoint
I found that didn't work right. After doing a bunch of research, I finally found that I had left out a few optional parameters that take care of this problem:
mount -t smbfs -o username=me,workgroup=NTDomain,gid=LinuxGroup,rw,dmask=770,fmask=770 //NTServer/share /mnt/mountpoint
----- explanation of command line --------
username=me - The Samba/NT user name to use to connect
workgroup=NTDomain - the NT domain name to use to connect
gid=LinuxGroup - the Linux group to own the mountpoint
rw - Mount read/write (This may not be needed, as it is the default)
dmask=770 - the chmod syntax for owner=rwx, group=rwx, other=none for directories
fmask=770 - The syntax for o=rwx,g=rwx,other=none (If you don't put this in, then it seems kind of random whether you will be able to create new files)
-------------------
Hope this helps someone, it sure had me scratching my head! :)
At the time, I had been using the following mounting syntax:
mount -t smbfs -o username=me,workgroup=NTDomain //NTServer/sharename /mnt/mountpoint
I found that didn't work right. After doing a bunch of research, I finally found that I had left out a few optional parameters that take care of this problem:
mount -t smbfs -o username=me,workgroup=NTDomain,gid=LinuxGroup,rw,dmask=770,fmask=770 //NTServer/share /mnt/mountpoint
----- explanation of command line --------
username=me - The Samba/NT user name to use to connect
workgroup=NTDomain - the NT domain name to use to connect
gid=LinuxGroup - the Linux group to own the mountpoint
rw - Mount read/write (This may not be needed, as it is the default)
dmask=770 - the chmod syntax for owner=rwx, group=rwx, other=none for directories
fmask=770 - The syntax for o=rwx,g=rwx,other=none (If you don't put this in, then it seems kind of random whether you will be able to create new files)
-------------------
Hope this helps someone, it sure had me scratching my head! :)
Rating: (You must be logged in to vote)
Discussion View:
By: Comfortably Anonymous
Times Read: 2,255
Likes: 0 Dislikes: 0
Topic: Linux
By: Comfortably Anonymous
Times Read: 2,079
Likes: 0 Dislikes: 0
Topic: Linux
Replies:
RE: smbmount and group ownership
Posted: 3/3/2001 2:30:16 PMBy: Comfortably Anonymous
Times Read: 2,255
Likes: 0 Dislikes: 0
Topic: Linux
Thank you I will try your idea to mount this machines drive to my samba server so I can then share the mount to the rest of the network without any trouble.
Rating: (You must be logged in to vote)
RE: smbmount and group ownership
Posted: 8/26/2003 10:51:59 AMBy: Comfortably Anonymous
Times Read: 2,079
Likes: 0 Dislikes: 0
Topic: Linux
in my case it didn't work, after some testing this worked:
smbmount //NTServer/sharename /mnt/mountpoint -o rw,dmask=777,fmask=777
i don't know if it is a good solution but it works :-)
smbmount //NTServer/sharename /mnt/mountpoint -o rw,dmask=777,fmask=777
i don't know if it is a good solution but it works :-)
Rating: (You must be logged in to vote)