Bug 487237

Summary: Creating compressed archives in read-only directory
Product: [Applications] ark Reporter: Alvin Tang <dev>
Component: pluginsAssignee: Elvis Angelaccio <elvis.angelaccio>
Status: CONFIRMED ---    
Severity: minor CC: felixernst, kfm-devel, rthomsen6
Priority: NOR    
Version: 24.02.2   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Compressing a file located in a directory with write permissions
Compressing a file located in a read-only directory

Description Alvin Tang 2024-05-19 14:36:33 UTC
Created attachment 169618 [details]
Compressing a file located in a directory with write permissions

SUMMARY
By right-clicking files in Dolphin, there is an option "Compress" to create TAR/7z/ZIP/etc. archives.
If the files are set with r-- (4) or r-x (5) permissions, the "Compress" option is greyed out. Otherwise, the option is available even if the directory in which the files are located is set as read-only. In other words, the "Compress" option can be chosen even when the user has no permission to write to the directory.
Dolphin claims that the compression is finished although the archive is not created.

STEPS TO REPRODUCE
1. Find a read-only directory (or chmod 500 to remove write permissions).
2. Open the directory using Dolphin.
3. Right-click on a file or subdirectory.
4. Choose an option under "Compress".

OBSERVED RESULT
Dolphin produces a notification stating "Compressed ... files (Finished)" although the archive is not created.

EXPECTED RESULT
The "Compress" option should be greyed out, or Dolphin should notify the user that permission is denied.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Arch Linux
KDE Plasma Version: 6.0.4
KDE Frameworks Version: 6.2.0
Qt Version: 6.7.0
Comment 1 Alvin Tang 2024-05-19 14:37:31 UTC
Created attachment 169619 [details]
Compressing a file located in a read-only directory
Comment 2 Felix Ernst 2024-05-24 22:04:25 UTC
Moving this bug report to Ark because the Compress action (and when it is enable or available) is implemented there AFAIK.