[리눅스에서 삼바셋팅 일반적인방법]

http://naompine.blogspot.kr/2015/08/14-centos-samba.html


[문제점]

위의 일반적인 셋팅 방법대로 해주어도 실제 윈도우에서 리눅스 공유 폴더로 접속을 하면

해당 리눅스 폴더의 권한과 파일권한을 다 주었는데도 파일 write와 modify가 되지 않았다. 


[원인]

Centos는 레드햇 계열이라 "보안 강화 리눅스"(Security Enhanced linux) 즉 selinux 설정 해제를 해주어야지 실제로 write와 modify가 정상적으로 되어진다.


[해결 방법]


1. vi 를 통해 "/etc/selinux/config" 에 접속한다.

2. selinux 를 화면과 같이 disabled 하면 된다.


[root@ns1 log]# vi /etc/selinux/config

# This file controls the state of SELinux on the system.

# SELINUX= can take one of these three values:

# enforcing - SELinux security policy is enforced.

# permissive - SELinux prints warnings instead of enforcing.

# disabled - SELinux is fully disabled.

SELINUX=disabled

# SELINUXTYPE= type of policy in use. Possible values are:

# targeted - Only targeted network daemons are protected.

# strict - Full SELinux protection.

SELINUXTYPE=targeted


시스템 재부팅


기타 방법 ( 위 내용 추천)

1. 수동으로 끄기(일시적으로만 먹힘)

system-config-securitylevel

setenforce 0


2. 커널 명령행에 다음 옵션 추가. (grub.conf 등에)

selinux=0


3. 명령어(바로 적용)

켜기 : # setenforce 1 

끄기 : # setenforce 0

 

[참고사이트]

http://blog.naver.com/tkdldjs35/221035408692

http://88240.tistory.com/405

https://ko.wikipedia.org/wiki/보안_강화_리눅스




Posted by 모과이IT
,