如何将我想共享的目录添加到 samba

如何将我想共享的目录添加到 samba

我按照以下步骤在 Ubuntu 上安装 Samba

http://www.howtogeek.com/howto/ubuntu/install-samba-server-on-ubuntu/

但它没有告诉我如何添加目录,例如

/var/www 

与 Windows 用户或 Mac 用户共享

答案1

示例smb.conf共享部分。

这将为文件夹创建一个名为“Utilities”的共享/opt/Utils。它为用户“username”授予写入权限,拒绝用户“root”访问,为来宾用户和其他所有人授予读取权限。其中包含一些示例选项,演示了文件和目录创建掩码以及文件名大小写处理。

# share name
# this is the name of the share shown in Windows share browser and "net view" command
[Utilities]

        # comment shows up in Windows share browser
        comment = Handy-dandy software repository

        # path to share
        path = /opt/Utils

        # share security -- who can access, who can't, who can write
        write list = username
        read only = yes
        directory mask = 0755
        create mask = 0644
        guest ok = Yes
        invalid users = root

        # filename case options, mostly for Win clients
        case sensitive = True
        default case = lower
        preserve case = yes
        short preserve case = yes

相关内容