From 276c22d53727b364dd6910b48b7b9f42baa1031b Mon Sep 17 00:00:00 2001 From: rugk Date: Sat, 24 Mar 2018 10:45:00 +0100 Subject: [PATCH] add create dir and correct user for data dir --- FAQ.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/FAQ.md b/FAQ.md index ad7198f..97fb59b 100644 --- a/FAQ.md +++ b/FAQ.md @@ -234,12 +234,16 @@ For most setups it is also possible to use the following script. Make sure to ed ```sh #!/bin/sh +# directories of privatebin pbpath='/var/www/privatebin' pbdata='/var/www/privatebin/data' -# htuser='www-data' (unused) +# user, of PrivateBin and web server (may be the same, as explained above) +pbuser='php' htgroup='www-data' rootuser='root' +mkdir -p "$pbdata" + echo "[chmod] files and directories" find "${pbpath}/" -type f -print0 | xargs -0 chmod 0640 find "${pbpath}/" -type d -print0 | xargs -0 chmod 0550 @@ -248,4 +252,5 @@ find "${pbdata}/" -type d -print0 | xargs -0 chmod 0750 echo "[chown] Directories" chown -R ${rootuser}:${htgroup} "${pbpath}/" +chown -R ${pbuser}:${rootuser} "${pbpath}/" ``` \ No newline at end of file