Samba3 with Linux clients - SMB

This is a discussion on Samba3 with Linux clients - SMB ; Hello, I try to use Samba3 with Windows and Linux clients. The problem is, that the Linux clients are using the file-permissions of files and directories of the server when I mount them. In most cases this ends in read-only ...

+ Reply to Thread
Results 1 to 5 of 5

Thread: Samba3 with Linux clients

  1. Samba3 with Linux clients

    Hello,

    I try to use Samba3 with Windows and Linux clients.

    The problem is, that the Linux clients are using the file-permissions of
    files and directories of the server when I mount them. In most cases
    this ends in read-only files.

    Is it possible to turn-off the unix-permissions on some way?

    I've tried mount options like uid, fmask and dmask, but this does not
    work recursive.

    With regards,
    Paul van der Vlis.
    Groningen, Netherlands.

  2. Re: Samba3 with Linux clients

    In article <41513e99$0$78738$e4fe514c@news.xs4all.nl>,
    Paul van der Vlis writes:
    >
    > I try to use Samba3 with Windows and Linux clients.
    >
    > The problem is, that the Linux clients are using the file-permissions of
    > files and directories of the server when I mount them. In most cases
    > this ends in read-only files.
    >
    > Is it possible to turn-off the unix-permissions on some way?
    >
    > I've tried mount options like uid, fmask and dmask, but this does not
    > work recursive.


    Three possibilities spring to mind:

    1) On the server, set "unix extensions = no". This will disable the
    server's ability to deliver Unix-style permissions, ownership, etc.,
    and the clients will create permissions and ownership just as they
    would for a Windows server.
    2) On the client, mount the shares using the "mount" command and the
    "smbfs" filesystem type, rather than the "smbmount" command or "mount"
    with a filesystem type of "cifs". I *THINK* this should have the same
    effect as #1, but this is from memory, and I might not be remembering
    correctly.
    3) Adjust ownership and permissions on the server so that the clients
    can read the files. This might or might not be practical, or even
    possible, depending on precisely what you want to do.

    Option #1 is probably simplest if you've got lots of clients. The
    advantage of option #2 is that you can adjust how each client treats the
    server, so you can use the Unix extensions on some clients but not on
    others. #3 is likely to be tricky at best; IMHO, the meshing of Unix
    permissions and SMB/CIFS permissions just doesn't work very well in a
    multi-user environment.

    --
    Rod Smith, rodsmith@rodsbooks.com
    http://www.rodsbooks.com
    Author of books on Linux, FreeBSD, and networking

  3. Re: Samba3 with Linux clients

    Rod Smith schreef:
    > In article <41513e99$0$78738$e4fe514c@news.xs4all.nl>,
    > Paul van der Vlis writes:
    >
    >>I try to use Samba3 with Windows and Linux clients.
    >>
    >>The problem is, that the Linux clients are using the file-permissions of
    >>files and directories of the server when I mount them. In most cases
    >>this ends in read-only files.
    >>
    >>Is it possible to turn-off the unix-permissions on some way?
    >>
    >>I've tried mount options like uid, fmask and dmask, but this does not
    >>work recursive.

    >
    >
    > Three possibilities spring to mind:
    >
    > 1) On the server, set "unix extensions = no". This will disable the
    > server's ability to deliver Unix-style permissions, ownership, etc.,
    > and the clients will create permissions and ownership just as they
    > would for a Windows server.


    Really thanks for your help Rod. I think this is what I need.

    > 2) On the client, mount the shares using the "mount" command and the
    > "smbfs" filesystem type, rather than the "smbmount" command or "mount"
    > with a filesystem type of "cifs". I *THINK* this should have the same
    > effect as #1, but this is from memory, and I might not be remembering
    > correctly.


    I mount shares from /etc/fstab with the "smbfs" filesystem type already.
    (I would like to mount a computer, not a share, but I don't know how)

    > 3) Adjust ownership and permissions on the server so that the clients
    > can read the files. This might or might not be practical, or even
    > possible, depending on precisely what you want to do.


    This is what I found out myself too. It works, but I don't like it.
    I need to force the file and directory permissions.

    > Option #1 is probably simplest if you've got lots of clients. The
    > advantage of option #2 is that you can adjust how each client treats the
    > server, so you can use the Unix extensions on some clients but not on
    > others. #3 is likely to be tricky at best; IMHO, the meshing of Unix
    > permissions and SMB/CIFS permissions just doesn't work very well in a
    > multi-user environment.


    Samba has become really complex...

    With regards,
    Paul van der Vlis
    Groningen, Netherlands.



  4. Re: Samba3 with Linux clients

    Paul van der Vlis wrote:

    > Hello,
    >
    > I try to use Samba3 with Windows and Linux clients.
    >
    > The problem is, that the Linux clients are using the file-permissions of
    > files and directories of the server when I mount them. In most cases
    > this ends in read-only files.
    >
    > Is it possible to turn-off the unix-permissions on some way?
    >
    > I've tried mount options like uid, fmask and dmask, but this does not
    > work recursive.
    >
    > With regards,
    > Paul van der Vlis.
    > Groningen, Netherlands.


    See the Linux cifs client mount option "noperm" which will disable the
    client side permission check (the server still enforces its ACLs and/or
    Unix mode). For more details see fs/cifs/README This option should be
    available since about 2.6.8

  5. Re: Samba3 with Linux clients



    Rod Smith wrote:


    >> The problem is, that the Linux clients are using the file-permissions of
    >> files and directories of the server when I mount them. In most cases
    >> this ends in read-only files.
    >>
    >> Is it possible to turn-off the unix-permissions on some way?

    On the server in smb.conf you can set "Unix Extensions = No" or on the
    client you can turn it off via a proc setting
    echo 0 > /proc/fs/cifs/LinuxExtensionsEnabled
    Neither is recommended since the Unix Extensions provide handling for device
    files and symlinks (at least from the cifs client). The cifs client (which
    will eventually replace smbfs) provides considerable flexibility for
    a) setting the mode/uid/gid on newly created files and directories
    b) ignoring the mode on client permission checks

    See fs/cifs/README for more details


    >>

    > 3) Adjust ownership and permissions on the server so that the clients
    > can read the files. This might or might not be practical, or even
    > possible, depending on precisely what you want to do.
    >

    That is usually pretty easy to do as long as server and client uids are the
    same (e.g. if you are running winbind or nss_ldap this is not too hard to
    do) - and you can mount multiple times on the client to the same server
    resource so the right uid will be mapped (also note the experimental parm
    /proc/fs/cifs/MultiUserMount which will allow mapping of the right local
    Linux uid to smb_uid (if a share is multiply mounted by each of the uids
    that use it).

+ Reply to Thread