Page MenuHome GnuPG

gpgtar --encrypt doesn't accept absolute path to a directory (gpgtar: skipping invalid name)
Closed, WontfixPublic

Description

gpgtar doesn't accept a full path of a directory, which is supposed to be encrypted. It throws error gpgtar: skipping invalid name

Expected behavior:

While being in folder /home/matt/scripts/ I expect to be able to encrypt files in /home/matt/data/

gpgtar --encrypt --output encrypt-test.gpg.tar -r "Matt" /home/matt/data/

throws error

gpgtar: skipping invalid name /home/matt/data/

I can only encrypt files and folders down the folder tree of the current path.

I would like to use absolute path in running script in cron.

Details

Version
2.2.27 (debian 11 package)

Event Timeline

werner claimed this task.
werner added a project: gnupg.
werner added a subscriber: werner.

Please use

gpgtar -C /home/matt/data ....

instead of using an absolute name. This makes things much easier to implement in a secure way: You don't want to have absolute file names in the tarball and mapping them to relative names is not easy or even impossible in case of, say "/home/foo/x.data /home/bar/x.data". Keep in mind that gpgtar does also not handle symlinks and other special files.

You should also update to a recent version (2.2.41 or much better 2.4.0)