Different user/group/permissions depending on which folder inside the Samba share a file is created in? - SMB

This is a discussion on Different user/group/permissions depending on which folder inside the Samba share a file is created in? - SMB ; Is it possible to achieve different permissions on a newly created file or folder depending on which folder inside a Samba share it is created in? Example: Inside my share 'my_share' I have two folders: private_folder public_folder Whenever a user ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: Different user/group/permissions depending on which folder inside the Samba share a file is created in?

  1. Different user/group/permissions depending on which folder inside the Samba share a file is created in?

    Is it possible to achieve different permissions on a newly created
    file or folder depending on which folder inside a Samba share it is
    created in?

    Example:
    Inside my share 'my_share' I have two folders:
    private_folder
    public_folder
    Whenever a user creates a file inside 'public_folder' it is assigned
    permissions 755, and whenever a file is created inside
    'private_folder', the file gets 700.

    Thanks,
    --Ulf

  2. Re: Different user/group/permissions depending on which folder inside the Samba share a file is created in?

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1
    NotDashEscaped: You need GnuPG to verify this message

    In comp.os.linux.networking arabub suggested:
    > Is it possible to achieve different permissions on a newly created
    > file or folder depending on which folder inside a Samba share it is
    > created in?


    > Example:
    > Inside my share 'my_share' I have two folders:
    > private_folder
    > public_folder
    > Whenever a user creates a file inside 'public_folder' it is assigned
    > permissions 755, and whenever a file is created inside
    > 'private_folder', the file gets 700.


    The easiest should be, setup a share for each and use "force
    mode" or alike, check the samba docs. (www.samba.org).

    --
    Michael Heiming (GPG-Key ID: 0xEDD27B94)
    mail: echo zvpunry@urvzvat.qr | perl -pe 'y/a-z/n-za-m/'
    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.2.1 (GNU/Linux)

    iD8DBQFArFR8AkPEju3Se5QRAtsWAJ9d5vvBbQOXVnnqqgyWw4 Afen1OtwCfRmBg
    2tRsKhVO5lm4G1qU6Tzga28=
    =TMEM
    -----END PGP SIGNATURE-----

  3. Re: Different user/group/permissions depending on which folder inside the Samba share a file is created in?

    In comp.os.linux.networking arabub wrote:
    > Is it possible to achieve different permissions on a newly created
    > file or folder depending on which folder inside a Samba share it is
    > created in?


    You could do this on the server if you use ACLs. I think most modern
    distributions deal with these. You can set up an ACL on each directory
    to specify a default user and group for new objects, though I've not
    used that capability for quite some time.

    See the manual page for setacl (?), or do a 'man -k acl'

    --
    Cameron Kerr
    cameron.kerr@paradise.net.nz : http://nzgeeks.org/cameron/
    Empowered by Perl!

+ Reply to Thread