help-tar
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Issue with GNU tar on OpenBSD - initgroups not permitted


From: Filipe de Sá-Soares
Subject: Issue with GNU tar on OpenBSD - initgroups not permitted
Date: Wed, 5 Apr 2023 19:42:13 +0100

Hello!

I am using GNU tar in OpenBSD 7.0 (gtar-1.34-static package).

Before (with OpenBSD 6.6) I used gtar without any issue.

However, now (with OpenBSD 7.0) I am getting an error that prevents me to use gtar as I was expecting.

When I am performing a level 1 backup to a remote tape drive using the
command:

$ /usr/local/bin/gtar -v -c -M -b 1024 --rsh-command=/usr/bin/ssh -f
soperator@192.168.10.17:/dev/rst0 -g /var/snapshots/gtar_1 -V "Level 1
backup - $TIMESTAMP" /somedir

I get the following error:

/usr/local/bin/gtar: initgroups: Operation not permitted
/usr/local/bin/gtar: Error is not recoverable: exiting now
/usr/local/bin/gtar: soperator@192.168.10.17\:/dev/rst0: Cannot open:
Input/output error
/usr/local/bin/gtar: Error is not recoverable: exiting now

The user soperator has permissions to use/write to the remote tape drive.

If I enter the same gtar command as root, there is no error message
and I am able to perform the backup to remote tape.

I posted this issue to the OpenBSD port maintainer, who noted the following:

gtar called initgroups(3) and it failed.
 
     The initgroups() function returns -1 if it was not invoked by the superuser.

The port maintainer observed that it seems that accessing a remote tape with gtar now requires the user to run as root and that this situation was not specific to OpenBSD.  He suggested I ask help-tar@gnu.org about this issue.

Could you provide me with some insights regarding this situation?

Thank you very much for your attention.

Filipe Soares




reply via email to

[Prev in Thread] Current Thread [Next in Thread]