yatima1460 / Drill

Search files without indexing, but fast crawling
https://drill.software/
GNU General Public License v2.0
268 stars 21 forks source link

Can't launch AppImages from r/o partitions #56

Open probonopd opened 5 years ago

probonopd commented 5 years ago

Linux distro Xubuntu 18.04 Live ISO

Build Version Drill-GTK-linux-x86_64-release-2.1.1.AppImage

Describe the bug

My AppImages are on a read-only partition. They are already executable.

me@host:~$ Downloads/Drill-GTK-linux-x86_64-release-2.1.1.AppImage 
2019-08-11T13:30:35.609 [critical] Crawler.d:398:crawlDirectory Failed to stat file `/proc/4424'
2019-08-11T13:30:42.864 [critical] Utils.d:68:openFile Can't set AppImage '/isodevice/Applications/VLC_media_player-x86_64.AppImage' as executable.
2019-08-11T13:31:00.929 [critical] Utils.d:68:openFile Can't set AppImage '/isodevice/Applications/XChat-2.8.8-x86_64.AppImage' as executable.
2019-08-11T13:31:02.221 [critical] Utils.d:68:openFile Can't set AppImage '/isodevice/Applications/XChat_IRC-x86_64.AppImage' as executable.

To Reproduce Steps to reproduce the behavior:

  1. Put AppImages on read-only partition
  2. Try to launch them using Drill
  3. They won't launch
  4. See error

Expected behavior

Drill should only attempt to set the executable bit if the bit is lacking and the AppImage is writable. If Drill can't set the executable byte, it should possibly still try to launch the AppImage.

yatima1460 commented 5 years ago

it's actually faster to just try to set them executable and then execute them and maybe show an error later saying they aren't executable than first checking if the execution bit has been set

2.2.1 will fix this

yatima1460 commented 5 years ago

Investigating a bit this seems impossible, the process needs to be spawned as a detached process so when Drill is closed the AppImage will continue to stay alive, but this means that the nanosecond after spawning it I will lose all connections and privileges to it

so probably checking the bit BEFORE is sadly the only solution

yatima1460 commented 4 years ago

ok for now I will consider not a fatal error when an AppImage can't be set as executable and Drill will try to run it anyway

in the future I will add that Drill will check the execution bit and if can't set the execution bit to executable AND the execution bit is false it will output an error