압축된 tar 파일을 마운트하고 업데이트하세요.

압축된 tar 파일을 마운트하고 업데이트하세요.

.tar.gz 파일을 마운트하고 업데이트(새 파일 추가, 파일 편집)한 다음 변경 사항이 원래 압축 파일에 반영되도록 마운트 해제하려면 어떻게 해야 합니까?

gzip으로 압축된 tar 파일에 대해 이 작업을 수행할 수 있는 도구가 없으면 다른 압축 형식을 사용할 수 있습니다.

archivemount를 시도했지만 읽기 전용 모드로 .tar.gz 파일을 마운트합니다.

답변1

기본적으로 archivemount읽기-쓰기 모드에서 작동하며 아마도 마운트된 tar.gz 파일의 권한으로 인해 사용자가 파일을 업데이트하는 것이 허용되지 않을 것입니다.

마운트 옵션에 "-o debug"를 추가하면 어떤 일이 발생하는지 이해하는 데 도움이 될 수 있습니다.

답변2

Fedora 20 1 에서는 잘 작동합니다 . 아마도 버그가 있거나엠프로모넷 추천, 아카이브는 읽기 전용입니다.

[root@f20 ~]# tar czf /tmp/ul137194.tar.gz -C / /etc/passwd /etc/group /etc/shells
tar: Removing leading `/' from member names
[root@f20 ~]# mkdir /tmp/ul137194
[root@f20 ~]# archivemount /tmp/ul137194.tar.gz /tmp/ul137194
[root@f20 ~]# find /tmp/ul137194
/tmp/ul137194
/tmp/ul137194/etc
/tmp/ul137194/etc/passwd
/tmp/ul137194/etc/group
/tmp/ul137194/etc/shells
[root@f20 ~]# rm /tmp/ul137194/etc/shells
rm: remove regular file ‘/tmp/ul137194/etc/shells’? y
[root@f20 ~]# echo nogroups > /tmp/ul137194/etc/group
[root@f20 ~]# umount /tmp/ul137194
[root@f20 ~]# tar xzf /tmp/ul137194.tar.gz -C /tmp/ul137194
[root@f20 ~]# find /tmp/ul137194
/tmp/ul137194
/tmp/ul137194/etc
/tmp/ul137194/etc/group
/tmp/ul137194/etc/passwd
[root@f20 ~]# cat /tmp/ul137194/etc/group
nogroups

1 archivemount-0.8.1-2.fc20.x86_64, libarchive-3.1.2-7.fc20.x86_64, 퓨즈-2.9.3-2.fc20.x86_64

관련 정보