The permission bit in a file mode that allows a file to be run as a program. Also, questions related the format of program files, and to locating and executing program files.
0
votes
0answers
20 views
“exec format error” on docker run
I have a MacBook Pro running Yosemite. On this I have Virtualbox installed with an Ubuntu system running within it. All packages on both are reasonably up to date (within a month of current).
...
5
votes
1answer
560 views
No such file or directory but I can see it!
I'm trying to run a python script, on a headless Raspberry PI using winSCP and get the following error message:
Command '"./areadetect_movie_21.py"'
failed with return code 127 and error message
...
0
votes
2answers
33 views
Java does not run with error “No such file or directory”, despite it exists and is x86_64
The file exists but bash complains it doesn't when asked to execute it.
$ ./Libs/openjdk-1.8.0_60-eap/bin/java
bash: ./Libs/openjdk-1.8.0_60-eap/bin/java: No such file or directory
$ ls -l ...
1
vote
2answers
21 views
How do I add a program with a directory of dependencies to $PATH?
I want to add a program to my $PATH, but its code is split into various files that it imports at run-time from a lib/ in its root directory.
projectRootDirectory
├ programBinary
└ lib
├ someLibrary
...
9
votes
1answer
187 views
When can I edit strings in an executable binary?
I have an executable binary; let's call it a.out. I can see the binary contains strings
$ strings a.out
...
/usr/share/foo
....
I need to change the string /usr/share/foo to /usr/share/bar. Can I ...
1
vote
1answer
43 views
File that is only readable with root privileges
I have a binary file that needs to run at startup on all accounts (including unprivileged user accounts), so a command to run it will be put into /etc/rc.local. The program itself will have only ...
0
votes
1answer
32 views
Error while executing a.out from C shell
I am in my home directory. And there is an executable a.out in there. I want to execute it like-
/bin/csh ~/a.out
^F^E@@@@@▒^A▒^A^H^C^D^B^B@^B@^\^\^A^A^E@@: Event not found.
Its not that I cannot ...
1
vote
0answers
59 views
Linux Executable with Unknown type asking to be executable every time I run it in Nemo
When I try to open an executable with the type Unknown I get a message saying:
"The file 'file name' has no known programs associated with it.
If you trust the source of this file, and have ...
1
vote
1answer
23 views
Resolving the location/registration of an executable in the system?
I am on Ubuntu 11.04, Gnome 2. I had at a certain point installed Adobe Reader (acroread), however "off-tree" (at a non-standard location) - and I just noticed something weird about this executable.
...
0
votes
2answers
85 views
Is there on Ubuntu a best way to execute a program than terminal command “./”
Is there on Ubuntu an best way to execute an program than terminal command "./".
I have put PhpStorm into an folder and when I want execute PhpStorm, I must cd bin/ and execute with this command: ...
0
votes
1answer
47 views
How i make this script execute every minute without cron? [duplicate]
I have this:
#!/bin/bash
wlan=`/sbin/ifconfig wlan0 | grep inet\ addr | wc -l`
if [ $wlan -eq 0 ]; then
echo wlan0 not connected, connecting...
echo
sudo ifup wlan0
logger wlan0 reconnected.
echo
...
1
vote
0answers
249 views
Can not execute Heroes of Neweth binary file
I'm trying to install Heroes of Newerth on openSUSE 13.2, KDE 4.14. I downloaded the client from official website.
I checked is executable option in properties. But when i double clicked on the file ...
6
votes
6answers
1k views
How can one run a program installed in one machine from another machine?
Is it possible to have, say, one machine with software installed and call that software from another machine? I thought this would be called an "application server" but by googling I find things that ...
2
votes
2answers
53 views
Is it possible to call an executable's functions?
I want to find out whether it is possible to circumvent an executable's gui by calling the programs internal worker methods/functions directly.
Assuming the executables are C/C++ programs with a ...
1
vote
2answers
140 views
How to execute Mach-O 32-bit C++ program on Linux?
I want to execute a program (which I know was written in C++), but I get this error:
zsh: exec format error: ./myProgram
Output of file myProgram:
myProgram: Mach-O i386 executable
My system is ...
0
votes
0answers
54 views
shared libraries error trying to run executable
I'm trying to run an executable off the command line in a linux cluster environment. The error message I get states
libssh2.so.1: cannot open shared object file: No such file or directory
I ...
-1
votes
1answer
570 views
what is zsh: exec format error in redhat?
zsh: exec format error...
his is the error I was getting when trying to execute a large application. I am using redhat Linux.
What can I do to solve this?
1
vote
3answers
214 views
/home/amnesia/myfile: command not found — 64-bit executable, 64-bit kernel
Trying to run an executable file on terminal (I am using Tails live OS), but I keep receiving an error message. I have set permissions already. The command I wrote:
sudo ./home/amnesia/myfile
I ...
0
votes
1answer
61 views
Are Linux Executables Compatible through All (x86_64) Linux Systems? [closed]
The Windows desktop proprietary softwares I see are usually distributed as statically compiled binary only files, possibly with some dlls, and the needed data files bundled in a package unpacked in a ...
0
votes
1answer
25 views
Linux/Unix Executables && FSH with libs/executing sequence
Okay, relatively new Linux User here. (Messed around with Linux for ages, looking for more depth)
I know that all files in Linux can be executed if they have the executable bit.
What are these ...
2
votes
2answers
158 views
print the /etc/shadow file in the console
How do I change the permissions of an executable file to access the /etc/shadow file?
So far I have the following bash script:
#!/bin/bash
gcc print.c -o print
chmod +s print
./print
exit 0
and ...
1
vote
2answers
334 views
Installing a bz2 file
Coming from a windows platform I am a bit confused over how compressed files are installed in Linux . I am using fedora 20.
Now I downloaded FoxIt pdf reader from here. I also read this post which ...
0
votes
4answers
209 views
how to execute a bash script without typing ./ [duplicate]
It has been bugging me for a very long time and I'm really sick of it. For example there's a script called testscript that compares two directories. In class the prof can just type
testscript dir1 ...
0
votes
1answer
91 views
What is the difference between the built in echo command and /bin/echo? [duplicate]
I was playing around with the type and which commands and I discovered something strange.
type either returns the path or says that a command is a Bash built in.
which either returns the path or ...
7
votes
1answer
320 views
Portability of an executable to another Linux machine
I've installed the program Motion on one Linux machine (M1) and want the same program on another (M2).
There are various builds of this program, and I have forgotten which one I have used, so can I ...
2
votes
1answer
87 views
can't execute a command even i'm in the group and command is -rwx--x---
I'm in $ORACLE_HOME/OPatch directory and when I type opatch then I get the response as,
-bash: opatch: command not found
If I do ./opatch, then I get the response as,
/bin/sh: ./opatch: ...
1
vote
2answers
119 views
Why the S_ISUID and S_ISGID mode bits got cleared when the owner or group of an executable file are changed by an unprivileged user
I was reading the man page of chown. I don't understand why S_ISUID and S_ISGID mode should be cleared when the function returns successfully.
0
votes
1answer
33 views
Find file names for executables, which are not used by other projects already
A new program which should be deployed as package for the major distributions should avoid name clashes.
ls /usr/bin
can show me that tail is a bad choice for a new binary file name. But how can I ...
0
votes
1answer
52 views
Installing Xcape (a newbie question involving the “make” command)
I executed the minimal building directions of xcape:
$ sudo apt-get install git gcc make pkg-config libx11-dev libxtst-dev libxi-dev
$ mkdir xcape
$ cd xcape
$ git clone ...
10
votes
2answers
901 views
Run a binary owned by root without sudo
I had a question on a job interview:
How can you execute (run) the program with the user user1 without sudo privilegies and without access to the root account:
$ whoami
# user1
$ ls -l ...
0
votes
0answers
257 views
Permission Denied on an Executable File
I am newbie to linux so any help would be greatly appreciated - I tried searching and am having trouble finding an answer.
Downloaded a compiled executable file (source written in c) in ubuntu I ...
0
votes
1answer
80 views
Directories showing up in green(executable) even after removing execute permission for all. (Ubuntu 12.04) [duplicate]
I just copied a directory from a USB flash drive. I copied it from an NTFS drive and so all the files had execute permission.
I executed chmod -x * to undo the execute permission. Despite that, all ...
4
votes
1answer
60 views
Preserve evidence of intrusion / deleted executable?
If you are faced with a non-root remote command execution vulnerability, and there is a foreign executable that's running on your Linux system from a user with only non-administrator privileges, ...
2
votes
1answer
1k views
How does bash execute an ELF file?
When I'm on my Linux Box I use bash as a shell. Now I wondered how bash handles the execution of an ELF file, that is when I type ./program and program is an ELF file. I grepped the bash-4.3.tar.gz, ...
3
votes
1answer
4k views
Running sh script: «Permission denied» despite the executable bit and root rights
I installed Debian in VirtualBox (for various experiments which usually broke my system) and tried to launch the VirtualBox guest addon script. I logged in as root and tried to launch autorun.sh, but ...
0
votes
2answers
552 views
Why setuid does not work on executable?
I know that enabling setuid on scripts has security issues and so is inactive by default, but expect that it works for executables.
I created and executable which shows uid as an output following ...
2
votes
4answers
176 views
Execute all files in a list
I have a source tree which, when make is run, produces several executables named "001", "002", and etc. I'm trying to write a script which will find all of these executables in my source tree, and ...
0
votes
1answer
3k views
ant command not found when running from the path othe than ant installation directory
Actually I have installed Ant in rhel5 environment and set ANT_HOME variable in /etc/profile which points to /usr/local/ant/bin so when I execute command echo $ANT_HOME it gives correct path but I get ...
2
votes
0answers
22 views
Executable exists for everything but bash & file manager [duplicate]
I am running Debian.
I was trying to use truecrypt the other day. I downloaded and extracted the zip, and ran the installer. I just extracted the file, and did not install it. I then tried executing ...
7
votes
1answer
10k views
sudo: unable to execute ./script.sh: no such file or directory
I'm stumped. I have a script in my /home directory which is executable:
[user@server ~]$ ll
total 4
-rwx------ 1 user user 2608 Jul 15 18:23 qa.sh
However, when I attempt to run it with sudo it ...
2
votes
3answers
2k views
Shell script not executing
Not sure what is happening.
Lets call script a.sh with the following
/users/guru$ cat a.sh
#! /usr/bin/ksh
echo "Hello"
date
Execute with ksh. It gets done.
/users/guru$ ksh a.sh
Hello
Tue Jul ...
3
votes
1answer
2k views
Bash Script Permission denied & Bad Interpreter
I'm on a kali linux 64 bit.
I have created a python script which takes 2 arguments to start. I don't want to type out every time the exact same paths or search in the history of the commands I used ...
4
votes
2answers
83 views
Find out extension of executable files?
When I am building software from source on a GNU+Linux system, during the ./configure stage I frequently see the following line:
checking for suffix of executables...
How do I create such a check ...
0
votes
2answers
82 views
Why do I have to execute bash programs with ./? [duplicate]
Why is it that some bash programs will only run on my system when I type ./ before their name?
An example: In my [...]/android/sdk folders I have to execute adb like this:
./adb devices
Why not ...
4
votes
1answer
307 views
Default to “Execute” when double-clicking on a shell script in PCManFM
Is it possible to get an executable to execute by default?
What I mean is this. I have an .sh file, which if I click on twice, it will show me this:
If I then click Execute, it does the right ...
2
votes
3answers
714 views
How is it possible to do a live update while a program is running?
I wonder how killer applications such as Thunderbird or Firefox can be updated via the system's package manager while they are still running. What happens with the old code while they are being ...
6
votes
2answers
253 views
Why there are multiple folders for executable files in Linux? [duplicate]
I'm trying to understand Linux file system, and one of the question is:
1- Why there are multiple folders for executable files: /usr/bin, /usr/sbin/ and /usr/local/bin? Is there any differences ...
2
votes
3answers
567 views
Run script without ./ before the name
I am running a quite complicated script which changes directories and runs many other commands. All these commands are run using 'scriptname', which works fine when I execute the main script from my ...
19
votes
2answers
4k views
What is the difference between running “bash script.sh” and “./script.sh”?
If script.sh is just something typical like
#!/bin/bash
echo "Hello World!"
Is there a preferred way to run the script? I think you first have to chmod it so it becomes executable?
1
vote
1answer
4k views
-ksh: revenue_ext.ksh: not found [No such file or directory]
I am getting the same not found [No such file or directory] error when trying to execute a ksh script. Read tips about the PATH and running the script with a ./ in the posts here and here and tried ...