pimoroni / fanshim-python

Python library for the Fan SHIM for Raspberry Pi
https://shop.pimoroni.com/products/fan-shim
MIT License
295 stars 85 forks source link

user umask=077 makes installation useable by root only #85

Closed ednl closed 1 year ago

ednl commented 4 years ago

My umask for user pi is 077 because I don't like everything to be world-readable by default. I installed the fanshim library and daemon and it works well. Later, I installed jupyter which failed to run by user pi, with error: "PermissionError: [Errno 13] Permission denied: '/usr/local/lib/python3.7/dist-packages/psutil-5.7.0.dist-info'". Apparently it needs the psutil package, too, and can't read it because everything there is owned by root with no permissions for group/others. (Package psutil was installed by fanshim.) I fixed it with this command: "sudo chmod -R go+rX /usr/local/lib/python3.7/dist-packages/"

I'm afraid I don't know anything about python package installation, so I am not sure how to solve. My best guess is to set an appropriate umask in the installation script, i.e. umask=022.