smb 와 selinux 설정
아 망할 selinux
smb에서 공유 디렉토리 이름에는 들어가는데 아무것도 안나오고
파일을 올리지 못할때에는 selinux가 탓이다!!!!! 법규!!!
아무튼 아래와 같이 명령을 주면 임시로 설정하는 건데 굳혀버릴려면 -P를 주고 하면 된다
(일단 테스트 였으니...)
# setsebool samba_export_all_rw 1 |
아래는 명령어로 조회해 본 설정값(centos 7 기본 설정인듯)
[root@localhost ~]# getsebool -a | grep samba samba_create_home_dirs --> off samba_domain_controller --> off samba_enable_home_dirs --> off samba_export_all_ro --> off samba_export_all_rw --> off samba_load_libgfapi --> off samba_portmapper --> off samba_run_unconfined --> off samba_share_fusefs --> off samba_share_nfs --> off sanlock_use_samba --> off tmpreaper_use_samba --> off use_samba_home_dirs --> off virt_use_samba --> off [root@localhost ~]# getsebool -a | grep smb smbd_anon_write --> off [root@localhost ~]# getsebool -a | grep nmb [root@localhost ~]# |
[링크 : https://wiki.centos.org/HowTos/SetUpSamba]
도움말 찾아 write 로 검색하니 똭!
If you want to allow samba to share any file/directory read/write, you must turn on the samba_export_all_rw boolean. setsebool -P samba_export_all_rw 1 |
[링크 : https://linux.die.net/man/8/smbd_selinux]
+
서버 접속해보니 SETroule 세부 정보로 해서 무언가 뜨고
거기서 이런걸 해제하라고 추천도 해주네.. 오오 좋은 세상이야