soedinglab / metaeuk

MetaEuk - sensitive, high-throughput gene discovery and annotation for large-scale eukaryotic metagenomics
GNU General Public License v3.0
178 stars 23 forks source link

Update EasyPredict.cpp #60

Closed ejrsimr closed 1 year ago

ejrsimr commented 1 year ago

Currently easypredict.sh will only run if the file system defaults to giving execute permissions to new files.
The simplest solution is to just run teh script as a parameter to /bin/sh. The script is already dependent on /bin/sh existing via "#!/bin/sh" and so this doesn't create a new dependency.

milot-mirdita commented 1 year ago

I missed this PR. I don't think that this will work. Since the command is not executed via a shell or system like command that accepts shell, but through the execve system call.

I had a prototype that works with in-memory files, however was hesitant to push that, since writing shell script in memory and executing them without writing to disk is kind of a common technique that malware often uses.

ejrsimr commented 1 year ago

I think you are right that my solution was suboptimal and other solutions except perhaps for the in-memory one are not very resilient or cross-platform (e.g. setting the execute bit)