I noticed that after installing something using
sudo I cannot run the application without
sudo even though the executable is in my path. I have to go into the application directory and manually change the permissions (using
chmod -R o=g <application>/). I have experienced this in 16.04, 14.04, and maybe even in 12.04. Why is this the default behavior and how can I change this?
As an example, I just compiled and installed KeePassX 0.4.4. Using the default installation commands (
sudo make install), the executable is
/usr/bin/keepassx with the expected permissions,
755, but files this executable points to, in
/usr/share/keepassx/ have permissions
750 preventing execution without using
When I install an application using
dpkg -i I use
sudo but all users can run the application. How do I mimic this behavior when compiling and installing an application from source? I realize I could add a
chmod command to the
Makefile but is there a way to make a change once that will propagate to future installs?