add create dir and correct user for data dir
parent
574ed90db5
commit
276c22d537
7
FAQ.md
7
FAQ.md
@ -234,12 +234,16 @@ For most setups it is also possible to use the following script. Make sure to ed
|
|||||||
|
|
||||||
```sh
|
```sh
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
# directories of privatebin
|
||||||
pbpath='/var/www/privatebin'
|
pbpath='/var/www/privatebin'
|
||||||
pbdata='/var/www/privatebin/data'
|
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'
|
htgroup='www-data'
|
||||||
rootuser='root'
|
rootuser='root'
|
||||||
|
|
||||||
|
mkdir -p "$pbdata"
|
||||||
|
|
||||||
echo "[chmod] files and directories"
|
echo "[chmod] files and directories"
|
||||||
find "${pbpath}/" -type f -print0 | xargs -0 chmod 0640
|
find "${pbpath}/" -type f -print0 | xargs -0 chmod 0640
|
||||||
find "${pbpath}/" -type d -print0 | xargs -0 chmod 0550
|
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"
|
echo "[chown] Directories"
|
||||||
chown -R ${rootuser}:${htgroup} "${pbpath}/"
|
chown -R ${rootuser}:${htgroup} "${pbpath}/"
|
||||||
|
chown -R ${pbuser}:${rootuser} "${pbpath}/"
|
||||||
```
|
```
|
Loading…
Reference in New Issue
Block a user