From cb042167fde9598cc5e1d4643f97c191123c6a40 Mon Sep 17 00:00:00 2001 From: rugk Date: Sat, 25 Nov 2017 19:16:10 +0100 Subject: [PATCH] make script a little nicer (thx shellcheck) --- FAQ.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/FAQ.md b/FAQ.md index 269a7dc..f43d9cd 100644 --- a/FAQ.md +++ b/FAQ.md @@ -233,18 +233,19 @@ The permissions need to look like this: For most setups it is also possible to use the following script. Make sure to edit the users and folders where necessary. ```sh +#!/bin/sh pbpath='/var/www/privatebin' pbdata='/var/www/privatebin/data' -htuser='www-data' +# htuser='www-data' (unused) htgroup='www-data' rootuser='root' -printf "chmod Files and Directories\n" +echo "[chmod] files and directories" find ${pbpath}/ -type f -print0 | xargs -0 chmod 0640 find ${pbpath}/ -type d -print0 | xargs -0 chmod 0550 find ${pbdata}/ -type f -print0 | xargs -0 chmod 0640 find ${pbdata}/ -type d -print0 | xargs -0 chmod 0750 -printf "chown Directories\n" -chown -R ${rootuser}:${htgroup} ${pbpath}/ +echo "[chown] Directories" +chown -R ${rootuser}:${htgroup} "${pbpath}/" ``` \ No newline at end of file