Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with samba permissions #30

Open
killmasta93 opened this issue May 19, 2022 · 2 comments
Open

Issue with samba permissions #30

killmasta93 opened this issue May 19, 2022 · 2 comments

Comments

@killmasta93
Copy link

Hi
Currently need to configure a docker samba for a printer which only has smbv1 to scan
i was reading the read me but cant seem to get it working
as the printer needs one user called scanner with full access and other user to only read that folder

so this is what i have so far but currently seem to be a permission issue this is my docker config

version: "3.5"
 
services:
  samba:
    image: crazymax/samba
    container_name: samba
    network_mode: host
    volumes:
      - "./data:/data"
      - "./scan:/scan"
    environment:
      - "TZ=Europe/Paris"
      - "SAMBA_LOG_LEVEL=0"
    restart: always 

and the
config for the permissions

auth:
  - user: scanner
    group: scanner
    uid: 1000
    gid: 1000
    password: mypass
  - user: client
    group: client
    uid: 1100
    gid: 1200
    password: mypass

global:
  - "force user = scanner"
  - "force group = scanner"

share:
  - name: scannfiles
    path: /scan
    browsable: yes
    readonly: no
    guestok: no
    validusers: scanner,client
    writelist: scanner
    veto: no

but when the user scanner tries to login and create a folder it says denied not sure why

Thank you

@fsdrw08
Copy link

fsdrw08 commented Nov 8, 2022

please try to modify the uid and gid to match with your docker host system related dir permission, e.g. have a check with your mapping dir permission: ls -al ./scan, and understand which local user/group have permission to access this dir, then run id -u <username> to get the uid and gid, then update the uid and gid in the config.yml

@mariomare22
Copy link

Hello @fsdrw08 I did that and did not help

on the host:

drwxr-xr-x  3 mario mario  5 Feb 15 18:59 timemachine
mario@server:/home/mario/config/samba2 $ id -u mario
1000

on the container:

server:/# ls -al timemachine/
total 54
drwxr-xr-x 3 1000 1000    5 Feb 15 18:59  .

on the config:

auth:
  - user: mario
    group: mario
    uid: 1000
    gid: 1000
    password: mario
global:
  - "force user = mario"
  - "force group = mario"

share:
  - name: Timemachine
    path: /timemachine
    browsable: yes
    readonly: no
    guestok: no
    validusers: mario
    writelist: mario
    veto: no
    hidefiles: /_*/
    recycle: yes

and I cannot access the share.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants