dperson / samba

Samba docker container
GNU Affero General Public License v3.0
1.52k stars 513 forks source link

permissions #365

Open zhejunliux opened 3 years ago

zhejunliux commented 3 years ago

hi, dperson boss:

server:104.193.88.77/24

user root
mkdir -p /home/ai-eng
chmod -R 666 /home/ai-eng
docker run -it --name samt -p 139:139 -p 445:445 -v /home/ai-eng/:/home/ai-eng/ -d dperson/samba -p -s "app;/home/ai-eng/;yes;no;yes;"
ls ~/tmp
kk.txt   nn.txt
cp -r ~/tmp /home/ai-eng

client:104.193.88.76/24

user nj
smb://104.193.88.77/
vim tmp/kk.txt
type kkkk

error_info:You do not have sufficient permissions to write to the file

to solve

ssh root@104.193.88.77
docker restart samt
action
ssh nj@104.193.88.76
smb://104.193.88.77/
vim tmp/kk.txt
type kkkk
no error

tell me why? and right solution, tks.

ciB89 commented 3 years ago

same issue as in #364

leqii-com commented 1 month ago

我是加了一个用户,提示拒绝访问,貌似只能用宿主主机已创建的用户,自己-u创建的用户 就拒绝访问,不知道为何?大师你知道吗?

version: '3'
services:
  samba:
    image: dperson/samba
    container_name: samba
    restart: always
    volumes:
      - /data/web/files:/mount
    environment:
      TZ: Asia/Shanghai
    command:
        - '-u'
        - "smb;mima"
        - "-s"
        - "share;/mount;yes;no;no;smb;smb;smb;"
zhejunliux commented 1 month ago

希望对你有帮助bro

version: '3'
services:
  samba:
    image: dperson/samba
    container_name: samba
    restart: always
    volumes:
      - /data/web/files:/mount
    environment:
      TZ: Asia/Shanghai
    command:
        - '-u'
        - "smbx;mima"
        - "-s"
        - "share;/mount;yes;no;no;smbx;smbx;smbx;"