无法从Windows访问共享文件夹


0

我尝试了一下并安装了ubuntu,希望能够设置一个服务器来共享音乐文件和运行torrent。。

我还安装了Samba,尽管可以从Windows 10笔记本电脑看到文件,但无法访问共享文件。

Testparm看起来像这样

Load smb config files from /etc/samba/smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
WARNING: The "syslog" option is deprecated
Processing section "[printers]"
Processing section "[print$]"
Processing section "[Torrents]"
Processing section "[Down]"
Loaded services file OK.
Server role: ROLE_STANDALONE

Press enter to see a dump of your service definitions

# Global parameters
[global]
    dns proxy = No
    log file = /var/log/samba/log.%m
    map to guest = Bad User
    max log size = 1000
    obey pam restrictions = Yes
    pam password change = Yes
    panic action = /usr/share/samba/panic-action %d
    passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
    passwd program = /usr/bin/passwd %u
    server role = standalone server
    server string = %h server (Samba, Ubuntu)
    syslog = 0
    unix password sync = Yes
    usershare allow guests = Yes
    idmap config * : backend = tdb


[printers]
    browseable = No
    comment = All Printers
    create mask = 0700
    path = /var/spool/samba
    printable = Yes


[print$]
    comment = Printer Drivers
    path = /var/lib/samba/printers


[Down]
    comment = Torrent folder
    create mask = 0666
    directory mask = 0777
    force create mode = 0666
    force directory mode = 0777
    guest ok = Yes
    path = /media/peter/Torrents/down
    read only = No

窗户上的错误说

“ Windows无法访问”。尝试使用名称和地址,但是以任何一种方式都得到相同的错误消息。

有指针吗?

谢谢


1
您是否要运行或复制共享中的文件?
Terrance

中所占的份额将是存储-所以复制文件并从共享
Bertmus

密码文件中是否存在用户“ nobody”(=来宾帐户的默认值)?
Marc Vanhoomissen

passwd文件包含
-none

Answers:


0

这不是桑巴舞的问题。这是Linux权限问题。

路径= / media / peter / Torrents / down

Linux创建/ media / peter目录的方式是限制谁可以遍历该目录,而不是其他任何人。来宾用户不是peter,因此它永远不会到达路径的/ Torrents / down部分。一种解决方案是,通过force user = peter在共享定义中添加,使来宾用户看起来像是该共享的您:

[Down] comment = Torrent folder create mask = 0666 directory mask = 0777 force create mode = 0666 force directory mode = 0777 guest ok = Yes path = /media/peter/Torrents/down force user = peter read only = No

然后重新启动smbd: sudo service smbd restart

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.