mounting Windows Shares

How can i mount a share from a Windows 2k3 Server, so that a normal user can write to it ?

i did:

mount.cifs //server/share /my/mount/point -o user=myUser

which mounts the share but only root can write to it. At least a normal user can create files (?) but no directories…

Take a look at our Master’s HowTo’s @swerdnalol!
Linux HOWTOs and Tutorials: Suse Linux 10.0, 10.1 openSUSE 10.2, 10.3, 11.0, 11.1

sorry as far as i see they just explain what i allready know.
I know how to mount the share. But I can’t write to it as a normal user.

See if this thread helps
SOLVED: Additional drives mount as read-only - openSUSE Forums

They are talking about NTFS ? and eSATA drives ?

what in particular did you mean ?

I was just following it thru and another link in it which seemed might be helpful. I don’t use samba only ssh

What mount point are you using?

i tried one in the root tree but also in the users Home directory.

The strange thing is, i do the same thing on a 11.1 machine where it works perfect. Not so on 11.2.

If you have kde’s dolphin super user, go to the folder and right click - properties - permissions - advanced permissions
and adjust - apply to all sub dir
apply

Well i guess it’s best if i answer this as the OS does:

Permission denied!

PS: Yes as superuser!

You can’t chown or chmod a cifs mount (were you trying that?). Whatever, the permissions on a cifs mount are set in the mount command, qualified and constrained by the permissions that flow through from the server.

Let’s get a bit more info. It’s a windows 2003 server, so there might be some interesting permissions or connection issues.

  • does myUser exist on the 2003 server? Does myUser exist on the client openSUSE box?
  • is your samba configuration set up as a domain member, or just using openSUSE’s default configuration (if you don’t know then run cat /etc/samba/smb.conf and post here the [global] stanza)
  • if you go to the share in a browser (nautilus/dolphin) do you have to authenticate or do you simply drill down for access
  • when you run the command you mentioned in a console, what’s the full dialogue that you get
  • after the mount, what are the file permissions (run this to see: ls -l /path_to/mount_directory)

does myUser exist on the 2003 server? Does myUser exist on the client openSUSE box?
Yes

is your samba configuration set up as a domain member, or just using openSUSE’s default configuration (if you don’t know then run cat /etc/samba/smb.conf and post here the [global] stanza)
suse default

if you go to the share in a browser (nautilus/dolphin) do you have to authenticate or do you simply drill down for access
I can just access the share. I can’t create a directory, but i CAN copy a file to that share.

when you run the command you mentioned in a console, what’s the full dialogue that you get

after the mount, what are the file permissions (run this to see: ls -l /path_to/mount_directory)

drone01:/home/mr # mount.cifs //data-node/repositories /home/mr/repos/ -o user=mr
Password:
drone01:/home/mr # ls -al | grep repos
drwxr-xr-x  1 root root          0 26. Dez 00:13 repos
drone01:/home/mr #

Try this:
mount.cifs //data-node/repositories /home/mr/repos/ -o guest,uid=mr,gid=users

drone01:/home/mr # mount.cifs //data-node/repositories /home/mr/repos/ --verbose -o guest,uid=mr,gid=users

mount.cifs kernel mount options: unc=//data-node\repositories,user=,ver=1,guest,uid=1000,gid=100,ip=192.168.8.254
mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

Since i did not allow guest access to that share, i tried this:

drone01:/home/mr # mount.cifs //data-node/repositories /home/mr/repos/ --verbose -o user=mr,uid=mr,gid=users
Password:

mount.cifs kernel mount options: unc=//data-node\repositories,ver=1,user=mr,uid=1000,gid=100,ip=192.168.8.254,pass=********
drone01:/home/mr #

now i can create dirs and files. strange that i can creat files but no directories the other way… Looks almost like a security issue to me.

Glad it’s working. The key was to change the ownership. More here:
Samba: HowTo Mount a CIFS Network Share [AKA Map Network Drive] in openSUSE 11 plus FAQs
particularly the sections titled
Temporary Mounts: Secure shares (username & password required)
and
Temporary Mounts: Prescribing the owner of the mount on the client
your final solution is a mix of those two.