Samba service does not have permission to access

Source: Internet
Author: User

The Samba service has been configured on CentOS for several days, and is always a problem that cannot be accessed in Windows Explorer:


I always thought it was me. Smbpasswd-a root command does not add the user, after the addition/deletion repeatedly do not know how many times, or does not work, the Linux and Windows Firewall is shut down, or does not work, then fully started Samba service configuration, Step-by-step operation down,results when you use the following command, you find the reason for no permissions:


a visit to the shared directory on the nt_status_access_denied listing, find the cause is always difficult, the reason to know after the good solution, the original is SELinux blocked.
Workaround One:Close Seliunx[[email protected]/]# getenforce; View current statusEnforcing[email protected]/]# Setenforce 0;SELinux Several states indicate:Enforcing: Mandatory mode, on behalf of the SELinux operation, and has correctly begun to limit the domain/type;Permissive: Tolerant mode: On behalf of SELinux operation, but only a warning message will not actually limit the access of domain/type. This model can be shipped as the use of SELinux debug;disabled: Off, SELinux is not actually running.              =========> Direct use of this method can be simple and easy to understand;Workaround Two:change the policy for SELinuxchcon-t samba_share_t shared directory (/var/www/html)
and then it was finally settled;

a summary of the following:1. The Samba service is first installed in the environment and can be installed using the Yum command on CentOS to solve the packet dependency problem;
Yum Install Samba samba-client Samba-swat
2. Configure the service:
If you only access the directory under your own user name, you do not have to configure the smb.conf file;
Add Samba users directly using Smbpasswd-a Chen;
Service operations are performed using commands such as service SMB restart/stop/status/reload;

Samba service does not have permission to access

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.