Store permissions separate from files


What to write Linux permissions are normally stored within the filesystem itself. Some filesystems do not include UNIX or Linux style permissions, they need to store the permissions separately. Posixovl is a FUSE filesystem that stores the permissions as files on the filesystem and presents a filesystem with the permissions and hides the special files for the permissions.

The posixovl FUSE library stores the permissions on the filesystem itself. This means we can store a Linux filesystem on any storage that don’t support regular permissions. My idea was to use shared folders (on OneDrive) from Windows in VirtualBox for backups, but it does not work as Windows file length limits were less than helpful.

To mount such a filesystem, find the storage location where the filesystem (including metadata files) will be stored. In the example, I mount the VirtualBox shared folder in /media/sf_files. That directory is then mounted to a different location with the posixovl overlay, in this example it’s /srv/files. Store your files with Linux permissions in /srv/files/.

The mount command to make this happen:

mount.posixovl -F -S /media/sf_backup/servers /srv/backup/ -- -o allow_other

To add the mount to fstab, you may need a fstab mount wrapper script for mount.posixovl.

The parameters:

  • -F is to make other mounts into that directory behave normally
  • -S is the directory structure (including metadata) that shound be mounted onto the target
  • -- -p allow_other is to make other users be able to use the directory

Pro tip: Write a readme.txt file with the mount command in the root directory to help you easily mount it in the future.

It took a while to find this, and it only has a few articles describing it’s use. Good luck with it, it made my backup operations much easier!

Navigate for more information about the posixovl FUSE driver on GitHub, and the man page for posixovl.