Bug 8140 - [Anolis23.1][RC2][DDE]文件夹共享时 勾选共享此文件夹时立即弹出samba服务失败
Summary: [Anolis23.1][RC2][DDE]文件夹共享时 勾选共享此文件夹时立即弹出samba服务失败
Status: RESOLVED FIXED
Alias: None
Product: Anolis OS 23
Classification: Anolis OS
Component: Desktop (show other bugs) Desktop
Version: 23.1
Hardware: All Linux
: P3-Medium S3-normal
Target Milestone: ---
Assignee: happy_orange
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-02-01 14:30 UTC by cxq321
Modified: 2024-03-29 09:41 UTC (History)
4 users (show)

See Also:


Attachments
samba服务失败 (86.22 KB, image/png)
2024-02-01 14:30 UTC, cxq321
Details

Note You need to log in before you can comment on or make changes to this bug.
Description cxq321 uniontech_group 2024-02-01 14:30:31 UTC
Created attachment 1011 [details]
samba服务失败

镜像:
anolis-23-aarch64-dvd1-20240128.3.iso
anolis-23-x86_64-dvd1-20240128.3.iso
现象:
右键选择文件夹共享时 在勾选共享此文件夹立即弹出samba服务失败
Comment 1 liuzhilin uniontech_group 2024-02-04 11:16:31 UTC
桌面文件管理器文件共享服务以samba服务作为后端来提供服务,它识别的后端服务名称smbd.service,而系统中samba的服务名称是smb.service, 因此在启用文件管理器文件共享功能时出现Samba服务启动失败的报错,这是因为未能识别到smbd.service.
解决办法:
1、备份smb.service并修改smb.service为smbd.service:
   cp /usr/lib/systemd/system/smb.service{,.bak}
   mv  /usr/lib/systemd/system/smb.service /usr/lib/systemd/system/smbd.service
2、创建目录设置权限:
   mkdir /var/lib/samba/usershares
   groupadd -r sambashare
   chown root:sambashare /var/lib/samba/usershares
   chmod 1770 /var/lib/samba/usershares
3、配置/etc/samba/smb.conf,内容如下:
   [global]
   usershare path = /var/lib/samba/usershares
   usershare max shares = 100
   usershare allow guests = yes
   usershare owner only = yes
4、重载服务配置和启动服务
   systemctl daemon-reload
   systemctl enable smbd.service --now
5、重新启动smb和nmb服务
   systemctl restart smb
   systemctl restart nmb
登出桌面再次登录桌面共享文件夹无报错。
Comment 2 liuzhilin uniontech_group 2024-03-04 16:36:54 UTC
按照备注解决问题