Skip to content
Snippets Groups Projects
Commit 35ed63bc authored by James Addison's avatar James Addison :speech_balloon:
Browse files

Archives: add file permissions hint/guidance

parent 791c3bec
No related branches found
No related tags found
1 merge request!165Archives: add file permissions hint/guidance
Pipeline #796982 passed
......@@ -110,6 +110,15 @@ To avoid this, either `unset POSIXLY_CORRECT` (only works with [tar>1.32](https:
`--pax-option=exthdr.name=%d/PaxHeaders/%f,delete=atime,delete=ctime` or `--format=gnu` (both only available in GNU tar)
or use `--format=ustar` if the limitations in that format are not a problem.
File permissions
----------------
Permissions on build artifacts may vary, for example due to differing `umask` settings. The resulting permission differences may be reflected when archive files containing them are created.
When possible, it is preferable to create build artifacts using deterministic permissions so that variance does not arise. However, sometimes it may be easier or more practical to configure static permissions later in the build, when the archive files are created.
To configure file permissions when creating a `tar` archive, you can use the `--mode` argument. For example, to request that, by default, unpacked files should be readable by everyone by default, writable only by their owner, and to allow everyone to list directory/folder contents, add: `--mode=a=rX,u+w`
Full example
------------
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment