The configuration of the/etc/samba/smb.conf is as follows:
#============================ Share Definitions ==============================[Homes] Comment=Home Directories browseable=No writable=Yes valid users= %S Valid Users= mydomain\%S[printers] Comment=All Printers Path= /var/spool/Samba browseable=no guest OK=No writable=No printable=Yes[downloads] Public=Yes comment=Share with Windows path=/home/leng/Downloads browseable=Yes guest OK=Yes writable= yes
To add an accessible user to the command line
# Smbpasswd-a Leng
After entering the password and accessing it on Windows, it is found that you can log on to the Samba server and be able to see the shared folder, but cannot access the folder as follows:
Workaround: (This method is mentioned in/etc/samba/smb.conf)
-T Samba_share_t/path/to/directory
So execute the above command:
#chcon-T Samba_share_t/path/to/directory
can solve the problem
Issues that Samba cannot access after sharing files on Windows