Browse Source

Ajout d'un parametre pour definir le nom d'utilisateur à appliquer

refactoring
Fabien Normand 2 years ago
parent
commit
f844359b2b
1 changed files with 18 additions and 6 deletions
  1. +18
    -6
      setPermissionsOpenDistrib.sh

+ 18
- 6
setPermissionsOpenDistrib.sh View File

#!/usr/bin/env bash #!/usr/bin/env bash


sudo chown guillaume:www-data . -R
if [ -z "$1" ]; then
echo "Vous devez ajouter en paramètre le nom de l'utilisateur à appliquer aux dossiers"
else
sudo chown $1:www-data . -R


sudo chown guillaume:www-data frontend/runtime/ -R
chmod 775 frontend/runtime/
sudo chown $1:www-data frontend/runtime/ -R
sudo chmod 775 frontend/runtime/ -R


sudo chown guillaume:www-data frontend/web/assets/ -R
sudo chown $1:www-data frontend/web/assets/ -R
sudo chmod 775 frontend/web/assets/ -R sudo chmod 775 frontend/web/assets/ -R


sudo chown guillaume:www-data backend/runtime/ -R
sudo chown $1:www-data backend/runtime/ -R
sudo chmod 775 backend/runtime/ -R sudo chmod 775 backend/runtime/ -R


sudo chown guillaume:www-data backend/web/assets/ -R
sudo chown $1:www-data backend/web/assets/ -R
sudo chmod 775 backend/web/assets/ -R sudo chmod 775 backend/web/assets/ -R

sudo chown $1:www-data producer/runtime/ -R
sudo chmod 775 producer/runtime/ -R

sudo chown $1:www-data producer/web/assets/ -R
sudo chmod 775 producer/web/assets/ -R

fi


Loading…
Cancel
Save