3

I am trying to install etcd on a Debian machine.

root@s1:/tmp/test-etcd# uname -a
Linux s1 3.16.0-4-amd64 #1 SMP Debian 3.16.36-1+deb8u2 (2016-10-19) x86_64 GNU/Linux
root@s1:/tmp/test-etcd# uname -m
x86_64

root@s1:/tmp/test-etcd# lshw -class cpu
  *-cpu                   
       product: Intel(R) Xeon(R) CPU           X3430  @ 2.40GHz
       vendor: Intel Corp.
       physical id: 1
       bus info: cpu@0
       width: 64 bits
       capabilities: fpu fpu_exception wp vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp x86-64 constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf pni dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 popcnt lahf_lm ida dtherm tpr_shadow vnmi flexpriority ept vpid

I followed the standard procedure from github repo :

ETCD_VER=v3.0.14
DOWNLOAD_URL=https://github.com/coreos/etcd/releases/download
curl -L ${DOWNLOAD_URL}/${ETCD_VER}/etcd-${ETCD_VER}-linux-amd64.tar.gz -o /tmp/etcd-${ETCD_VER}-linux-amd64.tar.gz
mkdir -p /tmp/test-etcd && tar xzvf /tmp/etcd-${ETCD_VER}-linux-amd64.tar.gz -C /tmp/test-etcd --strip-components=1

/tmp/test-etcd/etcd --version

But when I execute the etcd --version command I get a permission denied error.

root@s1:/tmp/test-etcd# ./etcd --version
-bash: ./etcd: Permission denied
root@s1:/tmp/test-etcd# ls -l
total 37776
drwxrwxr-x 11 1000 1000     4096 Nov  4 20:52 Documentation
-rw-rw-r--  1 1000 1000    29472 Nov  4 20:52 README-etcdctl.md
-rw-rw-r--  1 1000 1000     5628 Nov  4 20:52 README.md
-rw-rw-r--  1 1000 1000     7935 Nov  4 20:52 READMEv2-etcdctl.md
-rwxrwxr-x  1 1000 1000 20181952 Nov  4 20:52 etcd
-rwxrwxr-x  1 1000 1000 18444064 Nov  4 20:52 etcdctl
root@s1:/tmp/test-etcd# file etcd
etcd: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, stripped

The same exact procedure works on other 2 machines I am using with same operating system and very similar hardware.

I can see that bash doesn't recognize it as executable by the fact that it doesn't autocomplete the name by 'tabbing' , unlike on the other machines, but I really don't know what can be the issue.

Any suggestion ? I tried to chown to root. I tried to check if filesystem was mounted with noexec.

SOLUTION: I apparently overlooked the output of mount , and I didn't see the line /dev/mapper/vg00-tmp on /tmp type ext4 (rw,nosuid,nodev,noexec,relatime,data=ordered)

Moving the executable on another directory fixed the issue.

  • 1
    "I tried to check if filesystem was mounted with noexec" how? what was the result? e.g. mount | grep ^tmp – steeldriver Nov 11 '16 at 11:43
  • @steeldriver tmpfs on /run type tmpfs (rw,nosuid,relatime,size=1637024k,mode=755) tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev) tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k) tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755) I previously checked with mount | grep noexec – Sudneo Nov 11 '16 at 12:04
0

SOLUTION: I apparently overlooked the output of mount , and I didn't see the line

/dev/mapper/vg00-tmp on /tmp type ext4 (rw,nosuid,nodev,noexec,relatime,data=ordered)

Moving the executable on another directory fixed the issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.