vagrant@archlinux:~$ sudo pip2 install vcard
Downloading/unpacking vcard
Downloading vcard-0.9.tar.gz
Running setup.py (path:/tmp/pip_build_root/vcard/setup.py) egg_info for package vcard
Requirement already satisfied (use --upgrade to upgrade): isodate in /usr/lib/python2.7/site-packages (from vcard)
Installing collected packages: vcard
Running setup.py install for vcard
Installing vcard script to /usr/bin
Successfully installed vcard
Cleaning up...
vagrant@archlinux:~$ ls -l $(which vcard)
which: no vcard in (/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl)
total 0
vagrant@archlinux:~$ ls -l /usr/bin/vcard
-rwxr-x--- 1 root root 286 Nov 9 10:42 /usr/bin/vcard
/usr/bin/vcard
is only executable by root. What gives?
On my up-to-date Arch Linux machine it works as expected:
$ sudo pip2 install vcard
Downloading/unpacking vcard
Downloading vcard-0.9.tar.gz
Running setup.py (path:/tmp/pip_build_root/vcard/setup.py) egg_info for package vcard
Requirement already satisfied (use --upgrade to upgrade): isodate in /usr/lib/python2.7/site-packages (from vcard)
Installing collected packages: vcard
Running setup.py install for vcard
Installing vcard script to /usr/bin
Successfully installed vcard
Cleaning up...
$ ls -l $(which vcard)
-rwxr-xr-x 1 root root 286 Nov 9 10:40 /usr/bin/vcard
/usr/bin/vcard
is executable by everyone.
It seems this is caused by a restrictive umask:
vagrant@archlinux:~$ sudo bash -c umask
0027
Turns out it's set in the both the vagrant and root users's .profile
, for unknown reasons:
vagrant@archlinux:~$ sudo grep ^umask /root/.profile
umask 027
vagrant@archlinux:~$ grep ^umask ~/.profile
umask 027
umask
on vagrant? – Anthon Nov 9 '14 at 11:04umask 007
and install vcard the executable will be-rwxrwx---
(at least in a virtualenv). – Anthon Nov 9 '14 at 11:11python -c "import os; print os.umask(0)"
– Anthon Nov 9 '14 at 11:13umask
and installing vcard,pip2
just follows theumask
it gest from the environment – Anthon Nov 9 '14 at 11:17