I have two different Ubuntu computers that both has multiple user accounts. I wanted to try the latest version of the backup program Attic
, so I used pip3
to install it—with success. However, I can’t run the program as a normal user.
If I do a local installation with pip3 --user
, the program works as expected. But since I have multiple users, it would be too cumbersome to handle multiple local installations. I’d like to have one system-wide installation with normal users being able to run the program.
I’m guessing this is about permissions. How would one allow pip3
-installed packages, that aren’t local installations, to be used by regular users—i.e., without using sudo or the root account?
Edit:
It seems that I’ve made it work, although my solution feels very hacky, and I don’t know if it’ll it doesn’t survive a package update. I carefully examined the file path leading up to /usr/local/lib/python3.4/dist-packages/attic
and used chmod
for giving the “other” group appropriate permissions, since they had none! I also used chmod
on the individual py-files, giving them 644
.
I’ll let the question be open since there surely must be another, better way.
One thing leads to another... I have apparently, some time ago, changed the default UMASK
to 007
. I have no idea if that’s the cause of the issue at hand, but I think it could be. I don’t want to change the value back to find out, since I quite like the privacy the current value gives.
I think I’ll just write a shell script that sets the correct permissions for all the Attic
files (i.e. allowing “others” r
and in some cases x
), and then create an alias like sudo pip3 install --upgrade Attic && sudo ~/.local/bin/fix-attic-permissions
in ~/.bashrc
.