SELinux is enabled by default when installing CentOS, so samba, FTP and other applications cannot access the corresponding directories. The solution is as follows:
Enable Samba user home directory permission
/usr/sbin/setsebool -P samba_enable_home_dirs=1
Turn on single shared directory (path) permission
chcon -t samba_share_t path
Open all shared directories
Read-only rights
/usr/sbin/setsebool -P samba_export_all_ro on
read-write permission
/usr/sbin/setsebool -P samba_export_all_rw on
Check whether a directory (path) has permission enabled
ls -ldZ path
Similar Posts:
- [Solved] SELinux intercepts vsftpd for CentOS (without shutting down SELinux)
- [Solved] Apache Warning: DocumentRoot must be a directory
- How to Share Files Between Linux and windows
- Add Samba user prompt failed to add entry for user
- [Solved] su: warning: cannot change directory to : Permission denied ;-bash: bash_profile: Permission denied
- Solve the problem of ADB: command not found on MAC
- How to Solve Nginx Error 13: Permission denied) while connecting to upstream
- [Solved] Linux Oracle bash: “sqlplus / as sysdba”: command not found
- ImportError: libcusolver.so.8.0: cannot open shared object file: No such file or directory
- Aapache can’t start, error message: suexec mechanism enabled (wrapper: / usr / SBIN / suexec)