在 Centos 上共享硬盘并使用 samba

在 Centos 上共享硬盘并使用 samba

我在 centos 上使用 samba 共享外部硬盘时遇到问题。我可以从我的 windows 机器上查看共享组,但当我尝试访问它时,它显示“您无权访问”

我尝试过“强制用户=帐户”解决方案以及设置组777

我已经在下面包含了我的配置

[global]

    security = user
    idmap config * :backend = tbd
    printing = cups
    printcap name = cups
    load printers = yes
    cups options = raw
    netbios name= Centos
    force user = Home
[homes]
    comment = Home Directories
    valid users = %S, %D%w%S, Home
    browseable = No
    read only = No
    inherit acls = Yes

[printers]
    comment = All Printers
    path = /var/tmp
    printable = Yes
    create mask = 0600
    browseable = No

[print$]
    comment = Printer Drivers
    path = /var/lib/samba/drivers
    write list = @printadmin root
    force group = @printadmin
    create mask = 0664
    directory mask = 0775
[homefiles]
#sharegroup for desktop

path =  /srv/samba/homefiles
guest ok = Yes
browsable = Yes
writable = Yes
read only = no
force user = Home

[ExternalDrive]
#external drive 2tb

path = /run/media/Home/MYDRIVE
guest ok = yes
read only = no
force user = Home
browsable = yes

答案1

可以将硬盘安装在其他文件夹中。例如:/cdrom

相关内容