Tagged Questions

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.

learn more… | top users | synonyms

0
votes
0answers
10 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 ...
-2
votes
1answer
40 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
66 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
47 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
18 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
3answers
100 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
84 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
65 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
38 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 ...
6
votes
1answer
265 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
63 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
46 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
30 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
29 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
853 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
70 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
28 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
44 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
430 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
1k 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
180 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
165 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
1k 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 ...
6
votes
1answer
4k 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
606 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 ...
2
votes
1answer
857 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
68 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
66 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
165 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
322 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
239 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
538 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
3k 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
2k 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 ...
1
vote
2answers
79 views

How many sections can I create in object file?

I'm following the course of Baking Pi – Operating Systems Development. In it they created another section .init. So can we create as many sections as we want (not just .data, .bss, .text) and can we ...
0
votes
0answers
10 views

make: arm-elf-gcc: Command not found [duplicate]

I'm working on an application for a Moxa UC-7110, and I have installed their tool chain, which provides a cross compiler for their arm architecture on uClinux. I'm on on Ubuntu 12.04 LTS. I'm having ...
5
votes
1answer
227 views

How do I view executables run by a program?

Is there a way to view or get a list of executables that a program uses? A particular example is file-roller. Is there a way to see which executables it uses, if there is more than one executable it ...
2
votes
0answers
153 views

Shebang: History and Purpose [closed]

I have few questions about the magic number #!, the shebang. I read that it was introduced by Dennis Ritchie in the 70s as a way to see a script as an executable file. I don't understand, why it was ...
0
votes
2answers
50 views

Compiling for Red Hat 5.9

I need to compile a C++ application to run on Red Hat 5.9, but I don't have access to a development server that runs Red Hat 5.9. My current executable compiled on Ubuntu 10.04 produces the error ...
1
vote
1answer
140 views

can't get hello world shell script to run in FreeBSD

Server is running FreeBSD 9.2. Using vim, I wrote the following script called hello: #!/bin/sh echo "hello world" Then I set it as executable: >chmod 755 hello Then I tried to run it from ...
1
vote
2answers
11k views

chroot: failed to run command ‘/bin/bash’: No such file or directory [duplicate]

When I run the chroot command an error is given: failed to run command ‘/bin/bash’: No such file or directory
2
votes
1answer
168 views

A file exists but executing it doesn't work

I downloaded a Java tarball, extracted the archive and copied over scp to a remote machine. Using the ls command, the java executable exists: ubuntu@Ubuntu:~$ ls -la /home/ubuntu/jre1.7.0_55/bin/ ...
1
vote
1answer
50 views

How to compile to a specific executable format?

I'm a bit confused. I just read this: http://www.es.freebsd.org/doc/handbook/binary-formats.html, which basically says that freeBSD uses the elf binary format. But when I compile my code I using cc, I ...
0
votes
1answer
77 views

Create a package for debian that contain other program/deb package

I need some direction about this matter. I need to create a package or an executable program that will install some other deb package like tightvnc... So basically when I user execute my package, ...
0
votes
1answer
71 views

Trouble creating symbolic link [closed]

I installed a software on OpenSUSE. However, to open it one has to type /usr/local/software/start_software everytime. I tried creating a symbolic link using sudo ln -s ...
0
votes
1answer
877 views

Can't run executable file on Ubuntu, terminal expects sudo, or gives errors like “Invalid or incomplete multibyte or wide character”

I'm trying to run executable files on Ubuntu, but it's not working, although the exact same executable file works fine on others' machines, which are also running Ubuntu 12.04 like me. Based on this, ...
8
votes
3answers
292 views

where to put binaries so they are always in path and can be found easily

I am making quite some binaries, scripts etc that I want to install easily (using my own rpms). Since I want them accessible for everyone, my intuition would be to put them in /usr/bin; no need to ...
1
vote
1answer
118 views

List files, directories and executables in current directory

I have php shell and I have function that do just that (but it give me error when I call scandir($path) function because of restriction in php), so I need to use my bash shell to do the same. It can ...
1
vote
5answers
179 views

override hardcoded paths in executables

I'd like to override some hardcoded paths stored in pre-compiled executables like "/usr/share/nmap/" and redirect them to another dir. My ideal solution should not require root priviledges, so ...