Folder Permissions with Samba

0

Good evening guys.

I have a file server in linux, which is consumed in Windows. Each department has its own folder (and everyone uses a public folder), and I need only the user of that department to be able to access their folder (no problem it is visible to other users).

I did the following procedure:

  • I created the users in linux and samba;
  • I created the folders;
  • I changed the owner of the folder (chown user: userNamePasta);
  • I put the folder and user in smb.conf
  • When I access the server via ip (for example \ 192.168.1.100/Files) in windows explorer, I have the desired result, ie the user that is logged in (that I typed the username and the password) will have only access your folder. However, if I map the server address with net use, all folders are freed (net use Z: \ 192.168.1.100 \ files / user: username password).

    I made several changes in smb.conf to try to get around this and I have no idea how to fix this.

    I'll put snippets of my smb.conf

    [global]
        workgroup = SAMBA
        security = user
        valid users = adm ##Já coloquei o nome de todos os usuarios aqui para testar
        passdb backend = tdbsam
        wins support = yes
        netbios name = NomeExemplo
        map to guest = bad user
        guest account = nobody
    
    [Arquivos]
        path = /mnt/Arquivos
        writable = yes
        guest ok = yes
        admin users = adm
        write list = adm
        browseable = yes
        guest only = yes
    
    [Pasta Setor1]
        path = /mnt/Arquivos/Pasta Setor1
        valid users = usuario1
        write list = usuario1
        public = no
        browseable = yes
        writable = yes
    
    [Pasta Setor2]
        path = /mnt/Arquivos/Pasta Setor2
        valid users = usuario2
        write list = usuario2
        public = no
        browseable = yes
        writable = yes
    
    [Pasta Publica]
        path = /mnt/Arquivos/Pasta Publica
        comment = Pasta Publica
        public = yes
        browseable = yes
        writable = yes
    

    Thanks for the help if anyone has already experienced this or thinks there is something wrong with smb.conf

        
    asked by anonymous 09.01.2018 / 21:53

    0 answers