monarc-project / MonarcAppFO

MONARC - Method for an Optimised aNAlysis of Risks by @NC3-LU
https://www.monarc.lu
GNU Affero General Public License v3.0
101 stars 39 forks source link

Some files in script do not have the correct permissions #364

Closed prouveyrol closed 3 years ago

prouveyrol commented 3 years ago

While trying to install Monarc, running scripts/update-all.sh -c we get the following error : /var/lib/monarc/fo/scripts/update-all.sh: line 61: ./scripts/check_composer.sh: Permission denied

A quick check shows the following : 

root@cbe88b3a6426:/var/lib/monarc/fo# ls -lh scripts/
total 52K
-rwxr-xr-x 1 root root 1.2K Jul  9 07:28 backup_db.sh
-rw-r--r-- 1 root root 1.5K Jul  9 07:28 check_composer.sh
-rwxr-xr-x 1 root root 1.5K Jul  9 07:28 client-upgrade-db.sh
-rwxr-xr-x 1 root root  531 Jul  9 07:28 collect-stats-for-all-clients.sh
-rwxr-xr-x 1 root root  207 Jul  9 07:28 compile_translations.sh
-rw-r--r-- 1 root root  792 Jul  9 07:28 composer-update-for-php74.sh
-rwxr-xr-x 1 root root  167 Jul  9 07:28 extract_translations.sh
-rw-r--r-- 1 root root  538 Jul  9 07:28 fix_clients_dbs.sh
-rwxr-xr-x 1 root root 1.9K Jul  9 07:28 link_modules_resources.sh
-rwxr-xr-x 1 root root  207 Jul  9 07:28 seed-db.sh
-rwxr-xr-x 1 root root 2.8K Jul  9 07:28 update-all.sh
-rwxr-xr-x 1 root root  198 Jul  9 07:28 update_config_variables.sh
-rwxr-xr-x 1 root root  205 Jul  9 07:28 upgrade-db.sh

Some of the scripts do not have execution permissions.

ruslanbaidan commented 3 years ago

Could you try to run it with this commit: https://github.com/monarc-project/MonarcAppFO/commit/dfa826373af508bb8c290fa4890c7ee66df0174f

prouveyrol commented 3 years ago

Sorry, still not it :

root@57136cdb1430:/var/lib/monarc/fo# git rev-parse HEAD
dfa826373af508bb8c290fa4890c7ee66df0174f
root@57136cdb1430:/var/lib/monarc/fo# scripts/update-all.sh -c
Already up to date.
scripts/update-all.sh: line 61: ./scripts/check_composer.sh: Permission denied
Installing dependencies from lock file

However, I'm still pretty sure this this a permission problem in the repo. See :

root@57136cdb1430:/var/lib/monarc/fo# chmod +x scripts/check_composer.sh 
root@57136cdb1430:/var/lib/monarc/fo# scripts/update-all.sh -c
Already up to date.
Installing dependencies from lock file
Verifying lock file contents can be installed on current platform.
ruslanbaidan commented 3 years ago

Updated and pushed the correct permissions for the script. It works well now.