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

4
votes
1answer
160 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
182 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
44 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
46 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
57 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
49 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
147 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 ...
4
votes
2answers
217 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
520 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 ...
18
votes
2answers
2k 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
314 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
59 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
201 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
97 views

Shebang: History and Purpose

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
1answer
36 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
83 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 ...
0
votes
2answers
3k 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
99 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
44 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
48 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
54 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
324 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
204 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
76 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
114 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 ...
4
votes
6answers
197 views

List all binaries from $PATH

Is there one-liner that will list all executables from $PATH in bash.
2
votes
3answers
299 views

How to recover from recursive 'chmod -x' on my home folder

I pressed ENTER after typing the following stupid command on my home directory: find . -type f -exec chmod -x '{}' ';' What do you advise as a fix for this. My guess is that I can't do anything but ...
1
vote
1answer
85 views

How to find out the dynamic libraries executables loads when run

I want to find out the list of dynamic libraries a binary loads when run (With their full paths). I am using CentOS 6.0. How to do this?
15
votes
1answer
378 views

How to trick a particular command into thinking it is a different date?

How can I execute a command making it believe that is on a different date than system one? For instance, if I have this script: #!/usr/bin/env bash date +"%B %d, %Y" It prints the actual date: ...
5
votes
3answers
393 views

Why does this executable still execute after I deleted it?

I deleted the executable, so why is it still running? root@raspberrypi:/test# ls -la total 11096 drwxrwxrwx 2 pi pi 4096 Mar 12 18:26 . drwxrwxr-x 11 pi pi 4096 Feb 28 13:50 .. -rwxrw-rw- 1 ...
14
votes
2answers
1k views

How are system commands like ls created?

I'm a *nux newbie and I have some doubts regarding *nix. I don't know which type of executable file is ls, whether it is .sh or .ksh or any other kind of system executable if it is, what is that? ...
12
votes
1answer
856 views

Loading of shared libraries and RAM usage

I'm wondering about the way Linux manages shared libraries. (actually I'm talking about Maemo Fremantle, a Debian-based distro released in 2009 running on 256MB RAM). Let's assume we have two ...
2
votes
0answers
36 views

Set list of applications allowed for execution by unprivileged user

I am working on a project of security enforced Linux-based system (kernel 2.6.32 + Gnome 2 + Centos package base mostly). We need to implement the restriction of execution of unallowed executables. ...
2
votes
0answers
110 views

/proc/self/maps - 3rd mapped piece of file?

I'm running Arch linux on my laptop, which is kernel 3.12.9 right now. Something has changed about the way the kernel maps in a dynamically-linked executable and I can't figure it out. Here's the ...
4
votes
2answers
128 views

run perl script with unknown perl location

I'm developing a perl script which expected to be downloaded by Mac users with a very small knowledge of shell, linux etc, let's say office managers and accountants. After the downloading the script ...
0
votes
0answers
15 views

Restore system with no execute permissions for bash and chmod [duplicate]

Good day everyone! One of my friends asked me a question: how to restore an unbootable Linux system (let it be CentOS or whatever) in the following situation: no execute permissions for bash no ...
3
votes
1answer
665 views

Why is permission denied for npm start using node-dev?

I am trying to start a node.js application with on a low permissions user. All the files I know of are owned by the correct user and have permissions set reasonably well. I'm trying to use a script ...
2
votes
2answers
913 views

Why does sshd requires an absolute path?

Why does sshd require an absolute path when restarting, e.g /usr/sbin/sshd rather than sshd Are there any security implications? P.S the error message: # sshd sshd re-exec requires execution with ...
4
votes
2answers
72 views

File executable by all, yet still cannot be executed?

As shown by the following code: ll total 136 -rwxr-xr-x 1 kaiyin kaiyin 19067 May 9 2013 dbmeister.py -rwxr-xr-x 1 kaiyin kaiyin 1617 Jul 29 2011 locuszoom -rwxr-xr-x 1 kaiyin kaiyin 112546 May ...
5
votes
1answer
65 views

What does this command actually cause?

Once while talking with my friend I was trying to joke that we might stand a better chance of completing our project if we just run loads of random programs and expect one of them to solve our ...
0
votes
1answer
259 views

permission denied when executing binary despite “rwx” priviledge and root user

I'm trying to execute some binary with bash. I am getting a "Permission denied" message despite having given the full privileges (chmod 777) and being the 'root' user: This is the file description: ...
1
vote
0answers
55 views

What are the ramifications of running binaries over NFS?

Our small business has about 10 employee workstations and an LDAP/NFS server infrastructure. We need to deploy our proprietary application (a compiled binary) on all of the workstations. But since we ...
0
votes
5answers
270 views

On executable files in Linux [closed]

It is said that in linux, unlike Windows, there's not a clear border between executables and other files. Well, in Windows, I write a C++ program, then it is precompiled, compiled and then linked to ...
2
votes
1answer
684 views

permission denied on scripts in ~/bin

I set some additional locations to the PATH environment variable in my ~/.bashrc so that these are included/sourced in logins and non-interactive scripts that are scheduled with cron. I've noticed ...
2
votes
1answer
336 views

Mark as executable

I'm using Elementary OS. How do I mark a .jar file as executable. I do have JDK installed, but I get an error saying it isn't marked as executable.
0
votes
3answers
245 views

noexec on /tmp and /var/tmp directory

Our client servers are running old version of jboss (Jboss 4.0) which has lots of known vulnerabilities. Result is that the server is hacked and we are seeing some unknown executables running from ...
1
vote
0answers
145 views

chroot segfault

I've been trying to create a LXC container (lxc create) but at the end I get these messages: W: Failure trying to run: chroot /var/cache/lxc/debian/wheezy_armhf.partial mount -t proc proc /proc W: ...
0
votes
1answer
104 views

ELF interpreter error - Can't install on my CentOS

I don't know if I'm permitted to ask about zPanel here, but I'll go ahead and try and hope for the best. Stackexchange has helped me a lot in different areas... I was following the instructions to ...
0
votes
1answer
805 views

How to Create a Unix Executable File [closed]

Is it possible to create what the Mac Finder specifies as a "Unix Executable File" and run it in Terminal like any other command instead of creating a .sh or .command file? If so how and where can I ...