Centos Samba Server iptables and SElinux settings

Source: Internet
Author: User

1. Installing the Samba server

Yum Install Samba


2. Configuration

VI /etc/samba/smb.conf
Security = User (100 rows or so) under share definitions note all of the following configuration files

= == yes


3. Create a new user name, create a new folder, and set ACL permissions

# useradd-s/sbin/nologin-m You need to create a new user name
 mkdir -P in configuration (2), the path of the file to be stored


Acl:
1. See if you have ACL permissions

Mount grep " ACL " grep " grep "


2. If 1 has no output then you need to add permissions

VI /etc/fstab


In the/That column after the disk format is configured to add an ACL before

Reboot required after completion (please set, do not turn on the boot Oh!!!) )
Or

Mount /o remount

3. Configuring ACLS

# setfacl-m--m-u:test1:r-x/share


4. View ACL permissions

# Getfacl need to see the directory


4.iptables Set-up

139 -445 -j ACCEPT

Note:
139 445 ports must be open
If you need to use the computer name to access, you need to open 137 138 port,
However, basically do not use, open the above two ports for IP access.

Save and restart the firewall

#/etc/init.d/iptables Save &&/etc/init.d/iptables Reload

5.SEliux settings
View Rules

grep " Samba "



Configuration

Configuration based on what is mentioned in the smb.conf configuration file

 

# setsebool-p Samba_create_home_dirs=on && setsebool-p Samba_domain_controller=on &


6. Test can

Time:2016-08-10 23:22:04

Name: Wang

Mail:[email protected]

Centos Samba Server iptables and SElinux settings

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.