action-zip icon indicating copy to clipboard operation
action-zip copied to clipboard

Unzipping: Set file attributes correctly?

Open rajbos opened this issue 3 years ago • 4 comments

Description

I'm running this action on ubuntu-latest where I am sharing a zipped directory between jobs by using upload and download artefact. After downloading the zipfile, the zipfile itself has 'runner docker' as owning user + owning user group settings.

After unzipping the zipfile, all files have 'root root' as owning user + owning user group. That means the runner cannot execute the files. I tried resetting the rights with chown, but I get an Operation not permitted error back.

I also checked the file rights before being zipped and all files where runner docker before zipping. The zipfile is also created with 'root root'.

Preferred solution

Zip and unzip the file with the rights of the runner process, and not with root root.

rajbos avatar May 12 '21 15:05 rajbos

I'll have to look into this

montudor avatar Jun 10 '21 19:06 montudor

+1

keyzj avatar Jan 02 '22 20:01 keyzj

I can confirm this is still an issue.

makivlach avatar Nov 01 '22 23:11 makivlach

The problem is, since this is a Dockerfile action, it inherits the permissions from inside the docker container (which happens to be root here).

IgnisDa avatar Apr 16 '23 07:04 IgnisDa