Bug 442377 - ark does not preserve permissions when extracting folders
Summary: ark does not preserve permissions when extracting folders
Status: REPORTED
Alias: None
Product: ark
Classification: Applications
Component: general (other bugs)
Version First Reported In: 19.12.3
Platform: Ubuntu Linux
: NOR grave
Target Milestone: ---
Assignee: Elvis Angelaccio
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-09-13 09:42 UTC by Juan-Carlos Amengual
Modified: 2024-09-08 19:23 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
ZIP file to check whether ark preserves folder permissions (231.78 KB, application/zip)
2021-09-13 09:42 UTC, Juan-Carlos Amengual
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Juan-Carlos Amengual 2021-09-13 09:42:09 UTC
Created attachment 141508 [details]
ZIP file to check whether ark preserves folder permissions

This is the structure of a directory:

$ sudo tree -ps
.
├── [d--------- 4096] Peppo
│   ├── [-rw------- 2] Archivo de texto.txt
│   ├── [----rw---- 7390] LibreOffice Calc.ods
│   └── [d--------- 4096] zeppo
│   └── [-r-------- 111] Archivo HTML.html

2 directories, 3 files

Then, I run this command (I need root privileges to overcome permissions)

$ sudo zip -r kk.zip Peppo/

I have run "zipinfo" and the permissions are OK inside "kk.zip".

Whenever I extract the whole structure of "kk.zip" with ark (with dialog, i.e. graphics, with Dolphin's contextual menu, from console --running "ark --batch kk.zip"--), permissions of all the directories are **not** kept. Instead, all of the directories are created using system's umask (in my case 027, so permissions are rwxr-x--- for folders "Peppo" and "zeppo"). The permissions of all the files are OK (they are kept).

If I use "unzip" from the command line (unzip kk.zip), however, all of the permissions (directories and files) are perfectly kept.

This is annoying since there is no way to tell ark that the original permissions of directories must be kept when decompressing. Moreover, I think that the default behavior of ark should be the same as "unzip", that is, keeping the original permissions of both directories and files.

I think this is a bug because, in fact, ark preserves permissions when extracting files but not the directories. It seems that directories are not extracted but created.

You can even also try with the ZIP file attached to this report.

$ zipinfo prueba.zip 
Archive:  prueba.zip
Zip file size: 237341 bytes, number of entries: 6
d---------  3.0 unx        0 bx stor 19-Sep-04 18:16 Pruebas/
-rw-------  3.0 unx   192479 bx defN 04-Oct-04 13:18 Pruebas/Madrid_-_Valencia.jpg
-r--r-----  3.0 unx    44815 bx defN 04-Oct-04 13:21 Pruebas/p1_boletin windows04-05.sxw
-rw-r-----  3.0 unx    10240 bx defN 04-Oct-04 13:24 Pruebas/Plan-Curso.xls
----------  3.0 unx     1032 tx defN 04-Oct-04 13:19 Pruebas/nombres.txt
-rw-------  3.0 unx      138 tx defN 19-Sep-04 18:16 Pruebas/.directory
6 files, 248704 bytes uncompressed, 236289 bytes compressed:  5.0%

Permissions of folder "Pruebas" are not kept when extracting/decompressing with ark. If "unzip" is used instead permissions of folder "Pruebas" are preserved as expected.

Thanks a lot in advance for your consideration.
Comment 1 Juan-Carlos Amengual 2024-09-08 19:23:56 UTC
This bug was reported three years ago, I think that this is a serious bug and no comments at all. Really? Someone is reading this? Any news regarding this bug?