From 47d72365ccc7679d7d3e542b2bce08c9115ca0c1 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Tue, 16 May 2017 02:17:18 -0500 Subject: [PATCH] fix ownership on os x --- install.sh | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index fdcc7a7..b220b98 100644 --- a/install.sh +++ b/install.sh @@ -129,7 +129,10 @@ install_etc_config() $sudo_cmd mv "$my_app_dir/$my_app_etc_config" "$MY_ROOT/$my_app_etc_config" fi - $sudo_cmd chown -R www-data:www-data $(dirname "$MY_ROOT/$my_app_etc_config") + # OS X + $sudo_cmd chown -R _www:_www $(dirname "$MY_ROOT/$my_app_etc_config") || true + # Linux + $sudo_cmd chown -R www-data:www-data $(dirname "$MY_ROOT/$my_app_etc_config") || true $sudo_cmd chmod 775 $(dirname "$MY_ROOT/$my_app_etc_config") $sudo_cmd chmod 664 "$MY_ROOT/$my_app_etc_config" } @@ -171,8 +174,14 @@ export NPM_CONFIG_PREFIX=/opt/goldilocks $sudo_cmd mkdir -p /etc/goldilocks $sudo_cmd mkdir -p /var/log/goldilocks $sudo_cmd mkdir -p /srv/www +$sudo_cmd mkdir -p /var/www $sudo_cmd mkdir -p /opt/goldilocks/{lib,bin,etc} -$sudo_cmd chown -R www-data:www-data /srv/www /opt/goldilocks/{lib,bin,etc} +# OS X +$sudo_cmd chown _www:_www /var/www /srv/www || true +$sudo_cmd chown -R _www:_www /opt/goldilocks/{lib,bin,etc} || true +# Linux +$sudo_cmd chown www-data:www-data /var/www /srv/www || true +$sudo_cmd chown -R www-data:www-data /opt/goldilocks/{lib,bin,etc} || true npm install -g 'git+https://git@git.daplie.com/Daplie/goldilocks.js.git#v1' # Unistall