Przeglądaj źródła

Set command file permissions

Bob Mottram 8 lat temu
rodzic
commit
11899c9904

+ 1
- 0
src/freedombone-utils-final Wyświetl plik

39
     fi
39
     fi
40
     function_check split_gpg_key_into_fragments
40
     function_check split_gpg_key_into_fragments
41
     split_gpg_key_into_fragments
41
     split_gpg_key_into_fragments
42
+    set_command_file_permissions
42
 
43
 
43
     mark_completed $FUNCNAME
44
     mark_completed $FUNCNAME
44
     clear
45
     clear

+ 6
- 0
src/freedombone-utils-selector Wyświetl plik

570
 
570
 
571
                             ${PROJECT_NAME}-mirrors --app ${a}
571
                             ${PROJECT_NAME}-mirrors --app ${a}
572
 
572
 
573
+                            function_check set_command_file_permissions
574
+                            set_command_file_permissions
575
+
573
                             function_check install_completed
576
                             function_check install_completed
574
                             install_completed ${a}
577
                             install_completed ${a}
575
                             echo $"${a} was installed from interactive"
578
                             echo $"${a} was installed from interactive"
599
                                 function_check add_users_after_install
602
                                 function_check add_users_after_install
600
                                 add_users_after_install ${a}
603
                                 add_users_after_install ${a}
601
 
604
 
605
+                                function_check set_command_file_permissions
606
+                                set_command_file_permissions
607
+
602
                                 ${PROJECT_NAME}-mirrors --app ${a}
608
                                 ${PROJECT_NAME}-mirrors --app ${a}
603
 
609
 
604
                                 function_check install_completed
610
                                 function_check install_completed

+ 21
- 0
src/freedombone-utils-setup Wyświetl plik

416
     fi
416
     fi
417
 }
417
 }
418
 
418
 
419
+function set_command_file_permissions {
420
+    if [ -d /bin ]; then
421
+        chown root:root /bin/*
422
+    fi
423
+    if [ -d /usr/bin ]; then
424
+        chown root:root /usr/bin/*
425
+    fi
426
+    if [ -d /usr/local/bin ]; then
427
+        chown root:root /usr/local/bin/*
428
+    fi
429
+    if [ -d /sbin ]; then
430
+        chown root:root /sbin/*
431
+    fi
432
+    if [ -d /usr/sbin ]; then
433
+        chown root:root /usr/sbin/*
434
+    fi
435
+    if [ -d /usr/local/sbin ]; then
436
+        chown root:root /usr/local/sbin/*
437
+    fi
438
+}
439
+
419
 function setup_firewall {
440
 function setup_firewall {
420
     function_check create_completion_file
441
     function_check create_completion_file
421
     create_completion_file
442
     create_completion_file