편집하다:

편집하다:

CentOS 6.3 운영 체제 및 CentOS 6.5 운영 체제에 Samba를 설치하기 위해 다음 지침을 따랐습니다.

http://rbgeek.wordpress.com/2012/05/25/how-to-install-samba-server-on-centos-6/

6.5에서만 작동하는 것 같습니다. 나는 6.5에서 그 중 4개를 만들었고 그 설정에 매우 익숙합니다. 6.3에서 똑같은 작업을 수행하면 Windows의 UNC 경로 \192.168.245.132\MyShare에 있는 파일을 볼 수 없습니다. 하지만 나에게는 6.5 머신 4대가 모두 있습니다.

무엇이 잘못될 수 있나요?

이러한 운영 체제 간의 유일한 주요 차이점은 6.3에는 Selinux가 설치되어 있고 "강제"(켜기)로 설정되어 있다는 것입니다. 그래서 비활성화했습니다. 버전 6.5에서는 설치했지만 기본적으로 비활성화되어 있습니다.

# DISABLE SELINUX (BEFORE ACCESSING UNC PATH ON WINDOWS)

[root@localhost i2b2-1.6]# sudo nano /etc/selinux/config

# OLD VALUE:

# 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 - No SELinux policy is loaded.
SELINUX=enforcing
# SELINUXTYPE= can take one of these two values:
#     targeted - Targeted processes are protected,
#     mls - Multi Level Security protection.
SELINUXTYPE=targeted

# NEW VALUE:

# 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 - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of these two values:
#     targeted - Targeted processes are protected,
#     mls - Multi Level Security protection.
SELINUXTYPE=targeted

[root@localhost i2b2-1.6]# sudo service smb restart
Shutting down SMB services:                                [  OK  ]
Starting SMB services:                                     [  OK  ]
[root@localhost i2b2-1.6]# sudo service nmb restart
Shutting down NMB services:                                [  OK  ]
Starting NMB services:                                     [  OK  ]
[root@localhost i2b2-1.6]#

이는 6.5 보안 버전의 "MyShare" 폴더(일명 /samba/share/)에 있는 이미지입니다.

여기에 이미지 설명을 입력하세요.

6.3 설치 사진입니다.

여기에 이미지 설명을 입력하세요.

편집하다:

이제 이것은 흥미 롭습니다. 내 공유 디렉터리(/samba/share/)에는 6.3(작동하지 않는 OS)의 권한 끝에 "."(점)이 있고 권한 비트 뒤에 3이 있습니다.

[root@localhost share]# ls -la
total 12
drwsrwsrwx. 3 root root 4096 May 27 18:42 .
drwxrwxrwx. 3 root root 4096 May 27 17:48 ..
drwxrwxrwx. 6 root root 4096 May 27 19:03 quick_install

공유 디렉터리(/samba/share/)에는 6.5(작동 OS)의 권한 끝에 "."(점)이 없으며 권한 비트 뒤에 4(3 대신)가 있습니다.

[root@localhost share]# ls -la
total 16
drwxrwxrwx 4 root root 4096 May 22 01:02 .
drwxr-xr-x 3 root root 4096 May 19 00:28 ..
drwsrwsrwt 2 root root 4096 May 23 00:37 certs
drwxr-xr-x 6 root root 4096 May 19 01:05 quick_install

https://superuser.com/questions/230559/what-does-the-dot-mean-at-the-end-of-rw-rr-how-do-you-set-it-with-chmod

문제는 어떻게 제거할 수 있느냐는 것입니다. 이 디렉토리를 생성한 후 Selenix를 비활성화해야 했습니다. 어떻게 해결할 수 있나요?

편집 #2:

가까워지고 있습니다. 참고용이지만 100% 도움이 되는 것은 아닙니다.

https://superuser.com/questions/191903/how-do-i-remove-any-selinux-context-or-acl

이를 SELinux ACL이라고 하며, 많은 축구 부상으로 인한 인대와 혼동하지 마십시오. 유일한 문제는 삼바 파일 공유를 다시 시작하고 재부팅해야 할 수도 있다는 것입니다. 하지만 확실하지 않습니다.

[root@localhost share]# setfacl --help
setfacl 2.2.49 -- set file access control lists
Usage: setfacl [-bkndRLP] { -m|-M|-x|-X ... } file ...
  -m, --modify=acl        modify the current ACL(s) of file(s)
  -M, --modify-file=file  read ACL entries to modify from file
  -x, --remove=acl        remove entries from the ACL(s) of file(s)
  -X, --remove-file=file  read ACL entries to remove from file
  -b, --remove-all        remove all extended ACL entries
  -k, --remove-default    remove the default ACL
      --set=acl           set the ACL of file(s), replacing the current ACL
      --set-file=file     read ACL entries to set from file
      --mask              do recalculate the effective rights mask
  -n, --no-mask           don't recalculate the effective rights mask
  -d, --default           operations apply to the default ACL
  -R, --recursive         recurse into subdirectories
  -L, --logical           logical walk, follow symbolic links
  -P, --physical          physical walk, do not follow symbolic links
      --restore=file      restore ACLs (inverse of `getfacl -R')
      --test              test mode (ACLs are not modified)
  -v, --version           print version and exit
  -h, --help              this help text
[root@localhost share]#

관련 정보