LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   When using make install, installed files end up with wrong permissions (https://www.linuxquestions.org/questions/linux-software-2/when-using-make-install-installed-files-end-up-with-wrong-permissions-4175610034/)

RoyalSoldier 07-17-2017 10:17 AM

When using make install, installed files end up with wrong permissions
 
I have a machine running CentOS 7 in which when I install a program from source, the resulting permissions on the installed files are wrong, causing issues for non-root users.

Example (from problem machine):

Code:

drwx--x--x 3 root root    42 Jul 17 09:15 bin
drwx--x--x 2 root root  4096 Jul 17 09:15 boot
-rw-r--r-- 1 root root 171990 Jul 17 09:15 boot64.prc
drwx--x--x 2 root root    63 Jul 17 09:15 customize
drwx--x--x 2 root root    34 Jul 17 09:15 demo
drwx--x--x 3 root root    19 Jul 17 09:15 doc
drwx--x--x 4 root root    68 Jul 17 09:15 include
drwx--x--x 3 root root    25 Jul 17 09:15 lib
drwx--x--x 6 root root  4096 Jul 17 09:15 library
-rw------- 1 root root      2 Jul 17 09:15 swipl.home


Install with correct permissions (from a freshly installed CentOS 7 VM)

Code:

drwxr-xr-x. 3 root root  4096 Jul 17 10:10 bin
drwxr-xr-x. 2 root root  4096 Jul 17 10:10 boot
-rw-r--r--. 1 root root 172396 Jul 17 10:10 boot64.prc
drwxr-xr-x. 2 root root  4096 Jul 17 10:10 customize
drwxr-xr-x. 2 root root  4096 Jul 17 10:10 demo
drwxr-xr-x. 3 root root  4096 Jul 17 10:10 doc
drwxr-xr-x. 4 root root  4096 Jul 17 10:10 include
drwxr-xr-x. 3 root root  4096 Jul 17 10:10 lib
drwxr-xr-x. 6 root root  4096 Jul 17 10:10 library
-rw-r--r--. 1 root root      2 Jul 17 10:10 swipl.home


Does anyone know why this is happening and/or how to fix it?

Thanks

RoyalSoldier 07-17-2017 10:38 AM

it's the umask
 
the problem was the umask. Changed it to 0022 and everything is working fine now.


All times are GMT -5. The time now is 08:56 AM.