Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
smbmount
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2  
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Belthezar
n00b
n00b


Joined: 03 Jun 2002
Posts: 28
Location: Ohio, USA

PostPosted: Fri Nov 08, 2002 9:54 pm    Post subject: kerframil - you ROCK! Reply with quote

That was the 100% on the money solution I was looking for and for me it is working perfectly!!

I really like the tip about a seperate password file too because I was not comfortable with my password in the fstab file directly.

I think I found a solution to the permissions problem also. I logged in as my normal user and created a folder in my home folder. This is what I'm using as the mount point. When I then do a mount //server/share as the same user I get all the permissions I was wanting, and can create folders in the root of the sharepoint as well! :)

So maybe that is the key, to have the mount point be under an existing folder that the particular user controls if that makes sense.
Back to top
View user's profile Send private message
474
l33t
l33t


Joined: 19 Apr 2002
Posts: 714

PostPosted: Fri Nov 08, 2002 10:36 pm    Post subject: Reply with quote

Quote:
That was the 100% on the money solution I was looking for and for me it is working perfectly!!

Most pleased I am too to hear it, I might add :)

I haven't achieved quite the level of success you have (I'm sure I tried mounting in my home directory), but your report has encouraged me to re-examine that situation. I'll post again if I make a breakthrough, because there is obviously something at play here ...
Back to top
View user's profile Send private message
eyevee99
Apprentice
Apprentice


Joined: 16 Apr 2002
Posts: 239

PostPosted: Sat Nov 16, 2002 6:03 am    Post subject: works Reply with quote

mine all works, except the first windows mount still wont mount at boot.

Code:

//pixelacuity.home.box/data     /mnt/pixelacuity/data   smbfs   defaults,suid,uid=myuser,username=username,password=password         0 0
//pixelacuity.home.box/sassy    /mnt/sassy              smbfs   defaults,suid,uid=myuser,username=username,password=password         0 0
//pixelacuity.home.box/smooch   /mnt/smooch             smbfs   defaults,suid,uid=myuser,username=username,password=password         0 0


I haven't seperated out my passwords etc yet, but the above works.

mount -a will mount all three, but at boot time only the second two will mount.

It's really quite annoying.

:)
Back to top
View user's profile Send private message
zojas
Veteran
Veteran


Joined: 22 Apr 2002
Posts: 1138
Location: Phoenix, AZ

PostPosted: Fri Dec 20, 2002 9:50 pm    Post subject: Re: Close to cracking it, but ... Reply with quote

i do it slightly differently. I leave out the "users" option and add "noauto". then I must explicitly mount it as root like this:

Code:

mount -opassword=passwd /linuxmountpoint


then the w permission is still there for the user.

I suspect the "users" option is the culprit. if you take that out it may work, but you will still have to mount/umount only as root.

Quote:
BUT: you will *not* be able to create new folders/directories at the root of your mounted smb filesystem! However, you will be able to create and modify new directories and files under any existing directories inside the filesystem, if any are present 8O

Why is this? Well, in my case I made a folder called /home/kerin/smb/home. I set up a fstab line with the options I spoke of, which will mount to that directory. Now, if I look at the permissions of the mount point before mounting as kerin, they look like this:
Code:
drwxr-xr-x   1 kerin    kerin

Good. Now I do a mount /home/kerin/smb/home. Great, it works. Now everything's fine inside the filesystem mount point, but if I check the permissions of the mount point again they look like this:
Code:
dr-xr-xr-x   1 kerin    kerin

:cry: See how the w bit got dropped.
Back to top
View user's profile Send private message
lain iwakura
Apprentice
Apprentice


Joined: 09 May 2002
Posts: 176
Location: sd, ca

PostPosted: Wed Dec 25, 2002 1:28 pm    Post subject: Reply with quote

kerframil,

to answer your little problem, here's what works for me -- to keep write permissions on mounting of a smbfs (mounting a fat32 partition using win2000:)

Code:
//queeny/d$             /path/you/want/da/fs/to/reside/on                    smbfs
defaults,users,uid=myname,gid=users,dev,exec,rw,username=blah,password=blah


I also have samba emerged and configured (for the most part.) I'd post my globals but I don't think those are at fault or would help.

This should do it! :P
_________________
[resident anime junkie] -- not just a linux freak.
Back to top
View user's profile Send private message
lain iwakura
Apprentice
Apprentice


Joined: 09 May 2002
Posts: 176
Location: sd, ca

PostPosted: Wed Dec 25, 2002 1:35 pm    Post subject: Re: works Reply with quote

eyevee99 wrote:
mine all works, except the first windows mount still wont mount at boot.

Code:

//pixelacuity.home.box/data     /mnt/pixelacuity/data   smbfs   defaults,suid,uid=myuser,username=username,password=password         0 0
//pixelacuity.home.box/sassy    /mnt/sassy              smbfs   defaults,suid,uid=myuser,username=username,password=password         0 0
//pixelacuity.home.box/smooch   /mnt/smooch             smbfs   defaults,suid,uid=myuser,username=username,password=password         0 0


I haven't seperated out my passwords etc yet, but the above works.

mount -a will mount all three, but at boot time only the second two will mount.

It's really quite annoying.

:)


sounds like your fstab file is more than one line for that entry. make sure that entry is on one line -- including them zeros -- save, umount, then mount the dir and that will tell you if it will work on BOOT or not.

(p.s. -- don't reboot, for god's sake!!! ) heheh :P
_________________
[resident anime junkie] -- not just a linux freak.
Back to top
View user's profile Send private message
lain iwakura
Apprentice
Apprentice


Joined: 09 May 2002
Posts: 176
Location: sd, ca

PostPosted: Wed Dec 25, 2002 1:44 pm    Post subject: Re: kerframil - you ROCK! Reply with quote

Belthezar wrote:
That was the 100% on the money solution I was looking for and for me it is working perfectly!!

I really like the tip about a seperate password file too because I was not comfortable with my password in the fstab file directly.

I think I found a solution to the permissions problem also. I logged in as my normal user and created a folder in my home folder. This is what I'm using as the mount point. When I then do a mount //server/share as the same user I get all the permissions I was wanting, and can create folders in the root of the sharepoint as well! :)

So maybe that is the key, to have the mount point be under an existing folder that the particular user controls if that makes sense.


yeah, you don't wanna have the mofo to have root,root permissions -- obviously! :P

yeah, just mount the smbfs to a dir your non-root user(s) can access and read my above post (2 up) for more help! yay!
_________________
[resident anime junkie] -- not just a linux freak.
Back to top
View user's profile Send private message
Valen
Apprentice
Apprentice


Joined: 18 Aug 2002
Posts: 197
Location: Toronto, Ontario, Canada

PostPosted: Wed Dec 25, 2002 10:38 pm    Post subject: Re: Close to cracking it, but ... Reply with quote

kerframil wrote:

<SNIP>

BUT: you will *not* be able to create new folders/directories at the root of your mounted smb filesystem! However, you will be able to create and modify new directories and files under any existing directories inside the filesystem, if any are present 8O

Why is this? Well, in my case I made a folder called /home/kerin/smb/home. I set up a fstab line with the options I spoke of, which will mount to that directory. Now, if I look at the permissions of the mount point before mounting as kerin, they look like this:
Code:
drwxr-xr-x   1 kerin    kerin

Good. Now I do a mount /home/kerin/smb/home. Great, it works. Now everything's fine inside the filesystem mount point, but if I check the permissions of the mount point again they look like this:
Code:
dr-xr-xr-x   1 kerin    kerin

:cry: See how the w bit got dropped. That mask on the directory now prevents me from modifying or creating new files and directories in /home/kerin/smb/home, but because I specified the uid/gid options, I have no problem in, say, /home/kerin/smb/home/someotherfolder.

This is really bad. If you mount as root, it preserves the mask the way it is (and should be), but if you mount as an ordinary user, that one difference makes it impossible to manipulate the effective "root" directory of your mounted filesystem!

When you unmount, the mask goes back to the way it was. I have tried and failed to find a way of preventing this behaviour. If there is no workaround, it seems to me that this makes truly seamless integration into a Windows network pretty much impossible. One should not have to be root to do this, but it's the only way around it that I've found so far.

Does anyone know any better?


Two options control the permissions of smbfs mounts: fmask and dmask. fmask sets the permissions for every file on the share and dmask sets the permissions for every directory on the share.

I have used these options with some success:
Code:
username=valen,password=*,dmask=777,fmask=666

and for read only mounts I would guess that this would work:
Code:
username=valen,password=*,dmask=755,fmask=644


Hope this helps.
Back to top
View user's profile Send private message
474
l33t
l33t


Joined: 19 Apr 2002
Posts: 714

PostPosted: Thu Dec 26, 2002 7:37 am    Post subject: Reply with quote

Thanks for the tips, Valen, lain iwakura and zojas! I'll definitely check that out.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum