Hello

View: New views
2 Messages — Rating Filter:   Alert me  

Hello

by Linux User-12 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I'm not sure if I am on the right mailing list for this questions. I'm having
a hard time understanding/setting file permissions/uid/gid on the client side.

Here's my mount line:

sudo mount.cifs //comp2.localnet.webwaredev.org/games /mnt/games-share -v -o
uid=500 gid=networkshares file_mode=0775 dir_mode=0775

It's in verbose and this was what was outputted:

mount.cifs kernel mount options:
unc=//comp2.localnet.webwaredev.org\games,user=root,ver=1,uid=500,ip=192.168.0.3,pass=********

And this is what I am running into:

[lhorace@netsrv games-share]$ cd test
[lhorace@netsrv test]$ mkdir test2
[lhorace@netsrv test]$ ls -l
total 0
drwxr-xr-x. 2 lhorace root 0 2009-10-26 12:28 test2
[lhorace@netsrv test]$ touch filetext.txt
touch: cannot touch `filetext.txt': Permission denied
[lhorace@netsrv test]$ cd test2
[lhorace@netsrv test2]$ touch filetest.txt
touch: cannot touch `filetest.txt': Permission denied
[lhorace@netsrv test2]$

On a regular filesystem folder, if I am the owner of the folder, I should be
able to create files within the folder. And reading the output correctly, it
seems that uid is the only thing that get's pass to the kernel.

Note: uid=500 = lhorace, and lhorace exists on bothsystems including
networkshares.

What am I doing wrong? Any hints/clues would be entirely appreciative thank
you.. =)
_______________________________________________
linux-cifs-client mailing list
linux-cifs-client@...
https://lists.samba.org/mailman/listinfo/linux-cifs-client

Re: Hello

by Jeff Layton-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Mon, 26 Oct 2009 14:06:13 -0400
Linux User <linuxuser09@...> wrote:

> I'm not sure if I am on the right mailing list for this questions. I'm having
> a hard time understanding/setting file permissions/uid/gid on the client side.
>
> Here's my mount line:
>
> sudo mount.cifs //comp2.localnet.webwaredev.org/games /mnt/games-share -v -o
> uid=500 gid=networkshares file_mode=0775 dir_mode=0775
>
> It's in verbose and this was what was outputted:
>
> mount.cifs kernel mount options:
> unc=//comp2.localnet.webwaredev.org\games,user=root,ver=1,uid=500,ip=192.168.0.3,pass=********
>
> And this is what I am running into:
>
> [lhorace@netsrv games-share]$ cd test
> [lhorace@netsrv test]$ mkdir test2
> [lhorace@netsrv test]$ ls -l
> total 0
> drwxr-xr-x. 2 lhorace root 0 2009-10-26 12:28 test2
> [lhorace@netsrv test]$ touch filetext.txt
> touch: cannot touch `filetext.txt': Permission denied
> [lhorace@netsrv test]$ cd test2
> [lhorace@netsrv test2]$ touch filetest.txt
> touch: cannot touch `filetest.txt': Permission denied
> [lhorace@netsrv test2]$
>
> On a regular filesystem folder, if I am the owner of the folder, I should be
> able to create files within the folder. And reading the output correctly, it
> seems that uid is the only thing that get's pass to the kernel.
>
> Note: uid=500 = lhorace, and lhorace exists on bothsystems including
> networkshares.
>
> What am I doing wrong? Any hints/clues would be entirely appreciative thank
> you.. =)

Permissions on CIFS are confusing stuff...

CIFS doesn't manage multiple credentials per mount. In this case,
you're mounting the share with "user=root". So even though on the local
machine you're "lhorace" and the dir is owned by "lhorace" on the
server, the call goes out over the wire as "root" (which is probably
being mapped to an unprivileged user).

You probably want to redo the mount with user=lhorace, but be
forewarned that all the activity will be done as "lhorace" no matter
what user on the client is doing this activity.

--
Jeff Layton <jlayton@...>
_______________________________________________
linux-cifs-client mailing list
linux-cifs-client@...
https://lists.samba.org/mailman/listinfo/linux-cifs-client