bramp / archivemount Goto Github PK
View Code? Open in Web Editor NEWFUSE filesystem using libarchive (this is out of date copy of:
Home Page: https://github.com/cybernoid/archivemount
License: Other
FUSE filesystem using libarchive (this is out of date copy of:
Home Page: https://github.com/cybernoid/archivemount
License: Other
What is it ---------- Archivemount is a piece of glue code between libarchive (http://code.google.com/p/libarchive/) and FUSE (http://fuse.sourceforge.net). It can be used to mount a (possibly compressed) archive (as in .tar.gz or .tar.bz2) and use it like an ordinary filesystem. Installation ------------ From version 0.6.0 on archivemount uses autoconf, so just do the normal ./configure && make && sudo make install to build archivemount and install it to /usr/local. For building it, libfuse is needed in version 2.6 or higher, including its headerfiles of course (on most distributions those can be found in a package named something like libfuse-dev or so). Usage ----- archivemount <options> <archive> <mountpoint> Options are the normal fuse mount options, nothing special supported yet. Write support ------------- Writing to an archive with libarchive is unfortunately not possible. In order to provide write support thus the whole archive has to be recreated; this requires two things: space and time. To optimize at least the timely behaviour, archives are recreated only once: at the time of unmount. If there are any problems creating the new archive - bad luck, the changes are lost. Some checks are run when mounting the archive to determine if it can be mounted writeable, but there is no guarantee. Also note that unmounting a fuse filesystem is NOT necessarily completed when the unmount command returns. Although unmounting takes a long time already, fuse backgrounds the process and lets the unmount command return early. You can check on the real state of unmounting by checking the process list for archivemount. THERE IS ALSO NO GUARANTEE THAT DATA IS WRITTEN CORRECTLY. DO NOT TRUST THIS SOFTWARE! A backup is made of the original archive (with .orig appended to the name), but please understand that I, the author of archivemount, do not guarantee anything at all about the state of your data and I am not responsible if you lose vital information by using this software. YOU HAVE BEEN WARNED! Archive formats --------------- A note about archive and compression formats: libarchive supports a lot more formats for reading than it does for writing. Archivemount tries to do a sensible conversion here when writing the changed archive because I think most people do not care a lot about the exact version of tar used inside the .tgz file as long as their favourite archive tool can still cope with the file.
Libarchive has support for multi-volume archives, for example, RAR-archives split into foo.rar, foo.r00, foo.r01 etc. However, when mounting such an archive with archivemount foo.rar mountpoint
I get access denied errors when trying to read past the first part. Does not archivemount support multi-volume archives or am I doing something wrong?
As the title says, the archivemounted directory is displayed as a file through samba, so it cannot be accessed. From my searching this may be because the hardlink count is displayed as 0 instead of 2.
Hello and thank you for archivemount. :) I noticed that recent libarchive versions support password-encrypted Zip files. Do you have plans for adding support for this in archivemount as well? Currently, mounting such archives works and we can see the list of files fine, but trying to read any yields:
cat: todo.txt: Inappropriate ioctl for device
...presumably because that's when libarchive finally complains.
Hi, i just found his command and was beginning to play with it on Ubuntu.
Is Ubuntu just running an old version or is this really not supported? I would be really handy to rsync to a tar file from / on my system. This kinda ruins it though:(
cannot create symbolic link ‘/mnt/archivetest/bin/sh.distrib’: Function not implemented
So I've tried to mount a tarball (just a tarball, no compression, as the files within aren't compressible, so what's the point?) containing about 500 files without any options ( 'archivemount archive.tar mountpoint' ), but when I go to the mountpoint, I only see about 10 of these files.
I've checked the tar archive itself, and it still contains all the ~500 files.
Am I doing something wrong?
I'm using 0.8.7 that's made available in Debian's Sid repositories.
Here is a shell session showing the bug:
$ ls -l /tmp/mnt/file
-rw-r--r-- 0 renzo renzo 0 Dec 31 12:06 /tmp/mnt/file
$ chown root /tmp/mnt/file
$ ls -l /tmp/mnt/file
-rw-r--r-- 0 root nogroup 0 Dec 31 12:06 /tmp/mnt/file
$ chgrp root /tmp/mnt/file
$ ls -l /tmp/mnt/file
-rw-r--r-- 0 nobody root 0 Dec 31 12:06 /tmp/mnt/file
Fuse's chown callback uses the same policy of chown(2):
If the owner or group is specified as -1, then that ID is not changed.
My (untested) proposal for the fix is to change archivemount.c lines 2161-2162 as follows:
if (uid != ((uid_t) -1))
archive_entry_set_uid( node->entry, uid );
if (gid != ((gid_t) -1))
archive_entry_set_gid( node->entry, gid );
The site linked to in the README is down.
The current code is hosted here: https://github.com/cybernoid/archivemount
Mounting gzipped file returns
Unrecognized archive format
But when I wrap file with tar container everything is working fine.
I use CentOS7.4 x64.
I download archivemount-0.8.7
$ aclocal --verbose --warnings=all
$ autoconf --verbose --warnings=all
$ autoheader --verbose --warnings=all
$ automake --verbose --warnings=all --add-missing
When I run automake, there is a warning as follow:
###########
automake: thread 0: reading /usr/share/automake-1.13/am/clean-hdr.am
automake: thread 0: reading /usr/share/automake-1.13/am/progs.am
automake: warnings are treated as errors
Makefile.am:2: warning: compiling 'archivemount.c' with per-target flags requires 'AM_PROG_CC_C_O' in 'configure.ac'
automake: thread 0: reading /usr/share/automake-1.13/am/program.am
automake: thread 0: reading /usr/share/automake-1.13/am/compile.am
automake: thread 0: reading /usr/share/automake-1.13/am/depend.am
I ignore it, and ./configure
###########
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
/home/lb/Downloads/archiveMount/archivemount-0.8.7/missing: Unknown--is-lightweight' option Try
/home/lb/Downloads/archiveMount/archivemount-0.8.7/missing --help' for more information
configure: WARNING: 'missing' script is too old or missing
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for gcc... gcc
...
...
...
checking for unistd.h... yes
checking archive.h usability... no
checking archive.h presence... no
checking for archive.h... no
configure: error: libarchive headers not found.If the libarchive headers are installed then perhaps you should set the CPPFLAGS=-I/nonstandard/include/dir environment variable
I have installed libarchive(OS default installed), where can I find lib header?
By the way, I can find the libarchive.so
#########
[lb@localhost archivemount-0.8.7]$ ll /lib64/libarch*
lrwxrwxrwx. 1 root root 16 Jan 28 10:05 /lib64/libarchive.so -> libarchive.so.13
lrwxrwxrwx. 1 root root 20 Jan 17 06:02 /lib64/libarchive.so.13 -> libarchive.so.13.1.2
-rwxr-xr-x. 1 root root 688344 Sep 15 2016 /lib64/libarchive.so.13.1.2
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.