Git Product home page Git Product logo

archivemount's Introduction

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.

archivemount's People

Contributors

bramp avatar johannesbuchner avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

archivemount's Issues

Multi-volume support

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?

Password support?

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.

symbolic links, not suported?

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

Not all files are shown

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.

chown bug: when only owner or group is set, the other becomes -1

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 );

Can't mount gzipped file

Mounting gzipped file returns
Unrecognized archive format

But when I wrap file with tar container everything is working fine.

Config failed

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.