Linux共享文件夹

Linux共享文件夹

 

[root@localhost ~]# yum  install samba

[root@localhost ~]# chkconfig smb on

[root@localhost ~]# smbpasswd -a root

 

[root@localhost ~]# service iptables stop

 

 

vi /etc/selinux/config

 

[root@localhost ~]# cat /etc/selinux/config

 

# This file controls the state of SELinux on the system.

# SELINUX= can take one of these three values:

#     enforcing - SELinux security policy is enforced.

#     permissive - SELinux prints warnings instead of enforcing.

#     disabled - No SELinux policy is loaded.

SELINUX=disabled

#SELINUX=enforcing

# SELINUXTYPE= can take one of these two values:

#     targeted - Targeted processes are protected,

#     mls - Multi Level Security protection.

SELINUXTYPE=targeted

 

 

[root@localhost ~]#

 

vi /etc/samba/smb.conf

 

[root@localhost ~]# cat /etc/samba/smb.conf

 

[global]

        workgroup = workgroup

        server string = Samba Server Version %v

      

        log file = /var/log/samba/log.%m

        max log size = 50

 

        security = user

        passdb backend = tdbsam

 

        load printers = yes

        cups options = raw

 

[www]

        comment = www share

        path = /opt/www

        valid users = root

        browseable =yes

        public = yes

        writable = yes

 

需要重启系统

相关推荐