Support protected directories

by setting the sticky bit to all explicitly requested directories.
This commit is contained in:
Maximilian Paß
2022-10-25 11:38:16 +01:00
committed by Sebastian Serth
parent b1de6faa03
commit b3eee17846
3 changed files with 96 additions and 2 deletions

View File

@ -342,7 +342,7 @@ func tarHeader(file dto.File) *tar.Header {
return &tar.Header{
Typeflag: tar.TypeDir,
Name: file.CleanedPath(),
Mode: 0o755,
Mode: 0o1777, // See #236. Sticky bit is to allow creating files next to write-protected files.
}
} else {
return &tar.Header{