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

6
votes
1answer
493 views

Can capabilities be used in scripts without setcap'ing the interpreter binary?

Right now I'm using cap_net_bind_service MY_USERNAME in /etc/security/capability.conf. Now I just need to set cap_net_bind_service+i on the interpreter of my favouite scripting language to be able to ...
28
votes
8answers
29k views

What is /usr/local/bin? Came across it in an script installation for Applescript but would like to know more

Before today, I've used Terminal to a limited extent of moving in and out of directories, changing the dates of files using the touch command, but had realised the full extent of Terminal after ...
0
votes
0answers
13 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 ...
0
votes
0answers
265 views

python error using an executable with Z shell

I'm getting this error from the Unix Z shell (I'm on Mac): python: posix_spawn: /System/Library/Frameworks/Python.framework/Versions/2.6/Resources/Python.app/Contents/MacOS/Python: No such file or ...
-2
votes
1answer
46 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
70 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
48 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 ...
3
votes
1answer
1k 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
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 ...
2
votes
3answers
101 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
89 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
2answers
51 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 ...
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 ...
23
votes
4answers
21k views

Why do we use “./” to execute a file?

Why do we use ./filename to execute a file in linux? Why not just enter it like other commands gcc, ls etc...
5
votes
3answers
1k views

Find command: Searching for executable files

What type of parameter/flag can I use with the unix find command so that I search executables? (if this question is better suited for another stackexchange forum, I welcome you telling me so) p.s. ...
5
votes
3answers
12k views

Viewing Linux Library / Executable version info

In Windows, EXE and DLL have version info, including at least the following fields: file version product version internal name product name copyright In Linux Library / Executable: Which fields ...
0
votes
1answer
39 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
268 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
64 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
50 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 ...
107
votes
7answers
8k views

How to chmod without /usr/bin/chmod?

Today I was told a tale by a Unix trainer, a tale where the root password got leaked to the students, and one of the fellas removed the execute permission from /usr/bin/chmod itself. How do you ...
0
votes
1answer
30 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 ...
3
votes
2answers
197 views

place the aliased version of an existing command in /usr/bin/

I use Vim a lot, and I know how I can start vim in insert mode. So I have an alias named vii in my .bash_aliases file. On other hand I use Git a lot too, and I have this line in my .gitconfig: ...
1
vote
1answer
319 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: ...
4
votes
1answer
5k views

“No such file or directory” on an executable, yet file exists and ldd reports all libraries present

So by any other command the executable file exists, yet when I try to execute it, it claims it is not there. It is not a special character in the name because I renamed it though a "cat". And it ...
10
votes
2answers
855 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
80 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 ...
75
votes
3answers
16k views

How do I clear Bash's cache of paths to executables?

When I execute a program without specifying the full path to the executable, and Bash must search the directories in $PATH to find the binary, it seems that Bash remembers the path in some sort of ...
0
votes
1answer
31 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, ...
11
votes
4answers
5k views

Binary compatibility between Mac OS X and Linux

Brace yourselves, this question will likely appear naive and/or foolish, seeing as I am relatively new to the inner workings of unix like systems, and programming in general. Ready? Ok! I will go ...
2
votes
1answer
463 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
193 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 ...
0
votes
1answer
896 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, ...
2
votes
4answers
170 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 ...
4
votes
3answers
2k views

Why can't I run programs on another partition in Linux?

So for convenience, I store all my data on my Windows partition so that I can access my data easily from both Linux and Windows. However, I tried compiling a C++ program with g++, and found out that I ...
5
votes
1answer
182 views

What does `init [2]` mean in the COMMAND column of ps?

Reading What do the brackets around processes mean? I understand that the executable name is printed. Linux ps man page: Sometimes the process args will be unavailable; when this happens, ps will ...
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 ...
15
votes
1answer
608 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: ...
13
votes
5answers
9k views

#!/bin/bash - no such file or directory

I've created a bash script but when I try to execute it, I get #!/bin/bash no such file or directory I need to run the command: bash script.sh for it to work. How can I fix this?
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
659 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
942 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
172 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 ...