码迷,mamicode.com
首页 > Windows程序 > 详细

Samba 共享文件后在Windows 上无法访问的问题

时间:2015-05-16 18:02:25      阅读:169      评论:0      收藏:0      [点我收藏+]

标签:

/etc/samba/smb.conf的配置如下:

#============================ Share Definitions ==============================

[homes]
        comment = Home Directories
        browseable = no
        writable = yes
        valid users = %S
        valid users = MYDOMAIN\%S

[printers]
        comment = All Printers
        path = /var/spool/samba
        browseable = no
        guest ok = no
        writable = no
        printable = yes

[Downloads]
    public = yes
        comment = Share with windows
        path = /home/leng/Downloads
        browseable = yes
        guest ok = yes
        writable = yes

在命令行添加可访问的用户

# smbpasswd -a leng

输入密码后在windows上访问,发现可以登陆到samba服务器并且能够看到共享文件夹,但是无法进入该文件夹,如下:

技术分享

解决方法:(该方法在/etc/samba/smb.conf中有提到)

# Set SELinux labels only on files and directories you have created. Use the
# chcon command to temporarily change a label:
# chcon -t samba_share_t /path/to/directory

所以执行以上命令:

#chcon -t samba_share_t /path/to/directory

即可解决问题

Samba 共享文件后在Windows 上无法访问的问题

标签:

原文地址:http://www.cnblogs.com/dreamyphone/p/4507985.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!