[Linux]windows does not have access to samba security issues (turn off SELinux)

Source: Internet
Author: User

Background

After restarting the virtual machine on one day linux , windows after my connection samba , when I click some folders, there will be no permission to open the situation. This is a problem that I have reconfigured several times samba in the configuration, but no results.

Solve

After searching, there are two ways to solve the problem that some folders in Samba can't be accessed.

    • Method one modifies the security policy of files and folders;
    • Method two closed selinux ;

The first method is not appropriate, only a temporary solution. Because windows after you create a new linux folder, the next time linux you restart, the new folder is inaccessible. Trouble. The second method is simple, once and for all.

Although the internet said the closure selinux will have security issues. However, just the development of my virtual machine linux , not the production environment, not too high security issues.

Method one modifies the security policy
 chcon -t samba_share_t share

Chcon can modify the security context of a file. Resets security information for files and folders established by Windows. can also be solved, but more troublesome, inconvenient.

Method two close SELinux permanently shut down

Modify /etc/selinux/config files, set

SELINUX=disabled

Then restart Linux.

Temporarily closed

Use the setenforce command to modify the selinux pattern.

    • setenforce 1Set selinux to enforcing mode;
    • setenforce 0Set selinux to permissive mode.
Other Solutions

Https://wiki.centos.org/zh/HowTos/SetUpSamba has a fairly detailed explanation and solution. There is time to toss to see.

Above.

[Linux]windows does not have access to samba security issues (turn off SELinux)

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.