Samba cannot find the path or has no access permission

Source: Internet
Author: User
First test smbclient-L // 127.0.0.1-Uusername on the samba server and press enter to enter the password: [root @ Gthink ~] # Smbclient-L // 127.0.0.1Password: AnonymousloginsuccessfulDomain [GHOME] OS [Unix] Server [...

Test on the samba server first.
Smbclient-L // 127.0.0.1-U username press enter
Enter the password:
[Root @ Gthink ~] # Smbclient-L // 127.0.0.1
Password:
Anonymous login successful
Domain = [GHOME] OS = [Unix] Server = [Samba 3.0.28-1. el5_2.1]

Sharename Type Comment
--------------------
Homes Disk Home directories
Public Disk the user groups work directory
Temp Disk Temporary file space
IPC $ IPC Service (This is Linux files server)
Anonymous login successful
Domain = [GHOME] OS = [Unix] Server = [Samba 3.0.28-1. el5_2.1]

Server Comment
----------------
GCOMPUTER
SAMBA This is Linux files server

Workgroup Master
----------------
GHOME SAMBA

If the test is successful on the samba server, the local machine prompts that the path cannot be found or that no access is permitted.
Check whether the firewall on the server is configured and the relevant Port passes.
Iptables-a input-p tcp-I eth0-s 192.168.1.0/24 -- dport 139-j ACCEPT (do not know whether to add port 445)
Iptables-a input-p udp-I eth0-s 192.168.1.0/24 -- dport 137: 138-j ACCEPT
If not, shut down the firewall on the local machine and try again. (I just got stuck here. after a long time, I finally set zonealarm to allow relevant ports for normal use ).


There is also a command for selinux, but it has not been tested.
Setsebool-P smbd_disable_trans 1

Enable the following two lines in smb. conf (remove the; sign from the beginning of the line)

Setsebool-P samba_domain_controller on

After setsebool-P samba_enable_home_dirson takes effect, the home directory can be read and written normally.
If you want to set the/home/samba/temp directory to full sharing, you should write the input in the character state: chcon-t samba_cmd_t/home/samba/temp do not forget to set the/home/samba/temp directory attribute to 777 at the same time. It should be no different from other FC versions.

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.