Install samba4.1.1 on CentOS7

Source: Internet
Author: User

Install samba4.1.1 on CentOS7

Install samba in centos 7. Only upload is allowed, but deletion is not allowed. As follows:

1. Install samba:

  1. [Root @ samba ~] # Yum install-y samba-common samba-libs

2. Back up the main samba configuration file smb. conf:

  1. [Root @ samba ~] # Cp/etc/samba/smb. conf {,. bak}

3. Clear the master configuration file:

  1. [Root @ samba ~] #>/Etc/samba/smb. conf

4. The configuration is as follows:

[Global]

Workgroup = WORKGROUP

Server string = Samba Server Version % v

Security = share

Log file =/var/log/sambalog. % m

Load printers = yes

Security = user

Map to guest = Bad User

Cups options = raw

[Share]

Comment = share all

Path =/data/samba

Browseable = yes

Public = yes

Read only = no

# Valid users = nobody

Create mask = 1444

Directory mask = 1755

5. Create a shared directory:

  1. [Root @ samba ~] # Mkdir-p/data/samba


6. Set the group and master:

  1. [Root @ samba ~] # Chown-R nobody. nobody/data/samba


7. Start samba:

  1. [Root @ samba ~] # Systemctl start smb

8. Enable ports 139 and 445 of the firewall:

  1. [Root @ samba ~] # Iptables-I INPUT-p tcp-m multiport 139,445-j ACCEPT


9. Test Access and create a directory and a file in the shared directory. (Note: This directory can be deleted if no file exists in the new empty directory; when there are any files in the directory, the directory cannot be deleted unless the Administrator is notified to delete the files at the backend of the server !)

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.