ArchLinux Plasma 6 开启Samba服务(文件共享)

237 字
1 分钟
ArchLinux Plasma 6 开启Samba服务(文件共享)

在 Plasma 6 中的 Dolphin 使用文件共享

安装相关的插件#

Terminal window
pacman -Sy kdenetwork-filesharing

编辑 Samba 配置文件#

文件路径 /etc/samba/smb.conf

[global]
 usershare path = /var/lib/samba/usershares
 usershare max shares = 100
 # usershare allow guests = yes
 usershare owner only = no
 workgroup = WORKGROUP
 security = user
 passdb backend = smbpasswd
 name resolve order = lmhosts bcast host wins
 unix charset = UTF-8
 load printers = no
 printing = bsd
 printcap name = /dev/null
 disable spoolss = yes
 show add printer wizard = no
 server string = Samba Server
 log file = /var/log/samba/log.%m
 # Put a capping on the size of the log files (in Kb).
 max log size = 50
 dns proxy = no
#============================ Share Definitions ==============================
#
#[homes]
# 启用这个块会默认共享对应用户的home目录
#  comment = Home Directories
#  browsable = no
#  writable = yes

配置用户组和文件夹#

Terminal window
mkdir /var/lib/samba/usershares
groupadd fileshare
usermod -a -G fileshare $(whoami)
chown root:fileshare /var/lib/samba/usershares
chmod 1771 /var/lib/samba/usershares

启动 Samba 服务#

Terminal window
systemctl restart smb nmb
systemctl enable smb nmb

将Linux用户添加到Samba数据库#

这一步可以为Samba用户设置独立的密码

Terminal window
smbpasswd -a $(whoami)

重启#

Terminal window
reboot

支持与分享

如果这篇文章对你有帮助,欢迎分享给更多人或打赏支持!

打赏
ArchLinux Plasma 6 开启Samba服务(文件共享)
https://memo.moieo.net/2025/04/24/220548/
作者
Moieo
发布于
2025-04-24
许可协议
CC BY-NC-SA 4.0

评论区

Profile Image of the Author
Moieo
Slow and steady wins the race.
公告
网站已于2026年8月15日升级完成,感谢大家的支持!
分类
标签
最新动态
站点统计
文章
16
分类
7
标签
45
总字数
11,307
运行时长
0
最后活动
0 天前
站点信息
构建平台
Local
博客版本
Firefly v6.16.5
文章许可
CC BY-NC-SA 4.0