# Unable to write to CIFS mount

## deltamalloc

I am mounting a CIFS share with the following command:

```

mount.cifs //[ip]/[share] [mount path] -o username=[my username],password=[my password],uid=[some user foobar],gid=[mutual group for foobar and qux],sec=ntlm,rw

```

However even though I can see with ls -al that the directory is all the way either:

rwx for world

or

rwx for the mutual group

the user "qux" still cannot write to the mounted share. However the user "foobar" can write to it. Both users are in the mutual group.

----------

## vaxbrat

First off, put your login credentials into a file which is protected and then refer to that instead of passing them directly.  That stuff gets into your history or ends up being readable in the /etc/fstab.

Secondly, look into using pam_mount instead.  Once set up, each user will get a mount of the filesystem using their login credentials via pam when they log in.  The mount points are typically in subdirectories for each user under their individual homes.  When they log out, pam_mount should also automatically do an unmount.

----------

