3

How do I mount a .tar.gz file, update it (add new files, edit files), and then unmount it such that changes are reflected in the original compressed file?

I'm open to other compression formats if no tools exist to do this for gzipped tar files.

I've tried archivemount, but this mounts .tar.gz files in read-only mode.

2
6

By default archivemount works in read-write mode, probably the permissions of the mounted tar.gz file does not allow the user to update it.

Adding "-o debug" to the mount options could help to understand what occurs.

2

It works fine for me on Fedora 201, maybe you have a bug, or as mpromonet suggested, the archive is read-only:

[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

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.