/etc의 대상으로 rsync할 수 없습니다.

/etc의 대상으로 rsync할 수 없습니다.

Debian 10에서 11로 업그레이드한 후 /etc에 일부 대상이 있는 rsync 작업이 더 이상 작동하지 않습니다.

서버(대상) 측에는 다음이 있습니다.

uid = root
gid = root

hosts allow = mysender

[mymodule]
  # NOGO
  path = /etc/tmp

  # GO
  # path = /root/tmp

  comment = Just for testing
  read only = false

클라이언트 측(소스)에서 다음 명령을 입력합니다.

rsync -a /etc/temp/test myserver::mymodule

다음 메시지와 함께 rsync가 실패하게 됩니다.

rsync: [generator] recv_generator: mkdir "/test" (in mymodule) failed: Read-only file system (30)
*** Skipping any contents from this failed directory ***
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1333) [sender=3.2.3]

/etc 외부 경로(예: /root/tmp)를 사용하도록 서버를 구성하면 예상대로 작동합니다.

루트 파일 시스템(/etc 디렉토리도 포함)은 다음과 같습니다.~ 아니다물론 읽기 전용으로 마운트되었으며 깨끗합니다. 그렇다면 rsyncd는 왜 /etc를 읽기 전용 파일 시스템의 일부로 간주합니까?

답변1

/etcrsync 버전 3.2.0-1에는 무엇 보다도 쓰기 액세스를 방지하는 "ProtectSystem"이라는 향상된 기능이 도입되었습니다.https://download.samba.org/pub/rsync/NEWS). 이는 /etc/systemd/system/rsync.service.d/override.conf다음 내용으로 파일을 생성하여 재정의할 수 있습니다 .

[Service]
ProtectSystem=off

귀하의 초기 게시물 이후 오랫동안 도움이 되기를 바랍니다.

관련 정보