permissions: uid has to be set for RW access

i’m mounting a cifs share via fstab, and using both the uid and gid for the permissions when mounted (I did try with just gid set too…)
my user account is part of the ‘users’ group.

gid=users; i get read only
uid=nobody, gid=users; read only
uid=veehexx, gid=users; RW access.

why is that? surely if permissions are set to use groups rather than users, then it should work. how do i get around this?
all my knowledge is based in the Microsoft camp - if a user is in a group, then you can assign that group to a resource and it will work.

You might need to specify a file_mode of 664 and a dir_mode of 775 in your mount line so that the group has write permission. See man mount.cifs

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Filesystem permissions are based on first match. First check user and
then apply users’ permissions if applicable (and end if so). Next check
group and apply group’s permissions if applicable (and end if so).
Finally, apply “other” permissions. In this case I’m guessing the
permissions you have on this directory are allowing the user to read/write
and groups to read/only. You can add more permissions using extended
attributes but those are a bit different.

Good luck.


Want to yell at me in person?
Come to BrainShare 2011 in October: http://tinyurl.com/brainshare2011
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.15 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJOIjoXAAoJEF+XTK08PnB5pB4P/jnTx4olrrekPQ3lgJtmTC8E
aRQZxnUDaFc3iqf/BSaN6GgQum59r91gwRjRhtE0RnJMuYVbtBG5PPeRuMS9mNZJ
dvDrdBERigzktoa5qQAeMUs0W/uFLoU1TMh0nbkmS1ODaz1rsW+x9eEb+7NZ9zEP
as7V6A57Eon98CagrtnytBbnpBBQ7FLBCRs4hlZgM98F4Q/K05RFSpSA6Zdy58VM
Stx24sQenOlYthdc1Bb34K75LI1kBpRRuge5Ee5qPs0b9yLTRl14vZWGBfd1IiNZ
EBMyrQ5v8gHJc6C8jtl3sUaEsNfYbdY45BI3Nc4zksurbO9ObDr8RVUqAzGYA+v4
iosUTcBFeLxOAwXLHLwNA2383NYDTnM134T5t59bki6g2srXrqNJQX7GQGSxQjKE
IEa+MRnoR3WMdY694HQddw09908FPkl1GwqDde2FNkUvRqPKIIi6KD5w6haQhhpZ
DGoXBj52n1h6JHgB3C644I8QZeQKVPmOQHReYbHVtgZDSxy7Up7JUwZZsmj0W4/M
IVON8VHNBAbEFEfkcJUAJvTVb870A4wQxdMHZi6auXPJTkC/QfjN9DfkGNTBWWJJ
DN+BYB1V158Hf/KW4t4vB7W/dEOwk354z+Hi66bR+cvWvynrNMmvbosH0Ypn2kgk
Y6YtgjTQ/VKp5IhFMn2b
=WE6d
-----END PGP SIGNATURE-----

On Sat July 16 2011 04:06 pm, veehexx wrote:

>
> i’m mounting a cifs share via fstab, and using both the uid and gid for
> the permissions when mounted (I did try with just gid set too…)
> my user account is part of the ‘users’ group.
>
> gid=users; i get read only
> uid=nobody, gid=users; read only
> uid=veehexx, gid=users; RW access.
>
> why is that? surely if permissions are set to use groups rather than
> users, then it should work. how do i get around this?
> all my knowledge is based in the Microsoft camp - if a user is in a
> group, then you can assign that group to a resource and it will work.
>
>
veehexx;

This HowTo may be of value to you:

http://opensuse.swerdna.org/susesambacifs.html

Without knowing what you are entering in /etc/fstab, it is difficult to give
specific advice.

P. V.
“We’re all in this together, I’m pulling for you.” Red Green

sorted! I was missing ‘dir_mode=0775’ from the fstab entry.

fstab now looks like:
//192.168.0.3/data /mnt/nas1/data cifs username=USER,password=PASSWORD,_netdev,dir_mode=0775,file_mode=0664,gid=users 0 0

the few sites i found for fstab didnt mention the dir_mode option, only uid/gid.
thanks for the help guys.