diff options
author | nachoparker <nacho@ownyourbits.com> | 2017-08-29 19:48:30 +0300 |
---|---|---|
committer | nachoparker <nacho@ownyourbits.com> | 2017-08-29 19:56:52 +0300 |
commit | 8846df1ed7565509bfe5ef6b46330b2bc299f166 (patch) | |
tree | 1c4b3fb6c87fb0915e9c7c60a6b92e7379f02dd2 /etc/nextcloudpi-config.d/samba.sh | |
parent | 06a07cbb0c4ad5cbb200f08fad7251a9b0a03ac8 (diff) |
samba: fix permissionsv0.24.4
Diffstat (limited to 'etc/nextcloudpi-config.d/samba.sh')
-rw-r--r-- | etc/nextcloudpi-config.d/samba.sh | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/etc/nextcloudpi-config.d/samba.sh b/etc/nextcloudpi-config.d/samba.sh index 0903caea..8e7bd730 100644 --- a/etc/nextcloudpi-config.d/samba.sh +++ b/etc/nextcloudpi-config.d/samba.sh @@ -43,7 +43,7 @@ from 'nextcloudpi-config'" \ configure() { - [[ $ACTIVE_ != "yes" ]] && { service smbd stop; update-rc.d smbd disable; return; } + [[ $ACTIVE_ != "yes" ]] && { service smbd stop; update-rc.d smbd disable; echo "SMB disabled"; return; } # CHECKS ################################ @@ -53,13 +53,18 @@ configure() # CONFIG ################################ - sed -i '/\[NextCloudPi\]/,+5d' /etc/samba/smb.conf + sed -i '/\[NextCloudPi\]/,+10d' /etc/samba/smb.conf cat >> /etc/samba/smb.conf <<EOF [NextCloudPi] path = $DIR_ writeable = yes ; browseable = yes valid users = $USER_ + force group = www-data + create mask = 0770 + directory mask = 0771 + force create mode = 0660 + force directory mode = 0770 EOF update-rc.d smbd defaults @@ -69,6 +74,7 @@ EOF usermod -aG www-data $USER_ echo -e "$PWD_\n$PWD_" | smbpasswd -s -a $USER_ sudo chmod g+w $DIR_ + echo "SMB enabled" } cleanup() |