! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Cant view or set executeable on empty files
Status:
RESOLVED: FIXED

Comments

Description scootergrisen 2019-06-13 22:15:50 CEST
In Thunar file properties dialog i can view and set if the file is executeable... but only if the file is not empty.
If the file is empty i cant set the executeable bit but also i cant view if the file is executeable.
I would like to be able to view and set regardless of the file content.
Comment 1 Theo Linkspfeifer editbugs 2019-06-14 12:10:28 CEST
https://git.xfce.org/xfce/thunar/tree/thunar/thunar-permissions-chooser.c#n1027

The executable check box is only displayed for certain MIME types. Why should it be visible for an empty file?
Comment 2 scootergrisen 2019-06-14 12:22:29 CEST
I dont see why i should not be allow to see if a file is executable or not from inside Thunar based on it being empty or not.
Then i would have to use other software like the terminal when the file is empty.

Maybe i want to set the file executeable and fill the content of the file afterwards.
I dont see why software should try and decide for me what order i will do the things in.
Comment 3 Theo Linkspfeifer editbugs 2019-06-14 18:33:19 CEST
You could take any file and change its content afterwards (e.g. turn it into a shell script). The solution would be to remove the visibility restriction completely.
Comment 4 scootergrisen 2019-06-14 18:47:55 CEST
In a terminal i can:
create a file
set executeable
write something in the file

But i cant do this with the GUI the way Thunar is now.
I would have to change the order:
create a file
write something in the file
set executeable

Then if i empty the file in mousepad and save it and maybe now i want to not have it executeable anymore.
Then i have to use the terminal again.
Comment 5 Theo Linkspfeifer editbugs 2019-06-14 19:12:16 CEST
No need to repeat that. I was proposing to make the check box visible regardless of content type, whether it is empty or not.

We have to wait for a response from the Thunar maintainers.
Comment 6 Andre Miranda editbugs 2019-06-17 01:07:56 CEST
For the sake of consistency, how other file managers behave in this scenario?
Comment 7 Theo Linkspfeifer editbugs 2019-06-20 22:31:05 CEST
The check box is always accessible in Nautilus/Nemo/Caja.
Comment 8 alexxcons editbugs 2019-06-21 13:42:23 CEST
imo ok to always have the checkbox visible, I dont see any (security) problem with that.
Comment 9 Andre Miranda editbugs 2019-06-22 13:18:09 CEST
Created attachment 8664 
possible patch
Comment 10 alexxcons editbugs 2019-06-24 23:23:54 CEST
Works well for me & looks solid, thanks !
Comment 11 Theo Linkspfeifer editbugs 2019-06-25 21:55:48 CEST
*** Bug 12388 has been marked as a duplicate of this bug. ***
Comment 12 Git Bot editbugs 2019-07-06 21:18:11 CEST
Andre Miranda referenced this bugreport in commit 8c4cd0496858d91d1fc4e3b1be8d84dd62657982

Always show the executable checkbox (Bug #15605)

https://git.xfce.org/xfce/thunar/commit?id=8c4cd0496858d91d1fc4e3b1be8d84dd62657982
Comment 13 Git Bot editbugs 2019-07-06 21:18:36 CEST
Andre Miranda referenced this bugreport in commit dc7d18180cdaaca45cd49bc4ced8a26b2acaa706

Always show the executable checkbox (Bug #15605)

https://git.xfce.org/xfce/thunar/commit?id=dc7d18180cdaaca45cd49bc4ced8a26b2acaa706

Bug #15605

Reported by:
scootergrisen
Reported on: 2019-06-13
Last modified on: 2019-07-06

People

Assignee:
Xfce Bug Triage
CC List:
4 users

Version

Attachments

possible patch (1.57 KB, patch)
2019-06-22 13:18 CEST , Andre Miranda
no flags

Additional information