filerun docker 安装 怎么开启smb

依旧是 alpine系统,其他系统 自己替换对应命令 和包名称

1
2
3
4
apk add samba
apk add wsdd
rc-update add samba 
rc-update add wsdd 

文件权限,采取简单暴力手段,在crontab中 添加命令 一分钟一次

1
2
#crontabl -e
* * * * * docker exec -it filerun-docker_web_1 chown -R www-data:www-data  /user-files

filerun-docker_web_1 是filerun的容器名称

2023-05-05补:filerun在创建的时候,Apache可以指定用户。解决权限问题。

需要至少两个用户,用户1 有完整全新 用户2 只能读取某一个目录

1
2
3
4
adduser yanhui -G root  # deluser    yanhui
smbpasswd -a yanhui
smbpasswd -a guest
mv /etc/samba/smb.conf  /etc/samba/smb.conf-bak
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
# vi /etc/samba/smb.conf  编辑完成后重启 service samba restart
[sda1]
path = /mnt/sda1
comment = FileRun
browseable = no  
writable = yes
write list = yanhui
valid users =yanhui
display charset = UTF-8
unix charset = UTF-8
dos charset = cp936
[vod_ma]
path =  /mnt/sda1/filerun_files/vod/ma_smb
comment = vod_ma
browseable = Yes  
read only = Yes
guest ok = Yes
valid users = guest  yanhui
read list = guest 
write list = yanhui
Licensed under CC BY-NC-SA 4.0
comments powered by Disqus
使用 Hugo 构建
主题 StackJimmy 设计