Kaynağa Gözat

Write permissions to data directory

Bob Mottram 7 yıl önce
ebeveyn
işleme
28d7a0fa2f
1 değiştirilmiş dosya ile 3 ekleme ve 2 silme
  1. 3
    2
      src/freedombone-app-privatebin

+ 3
- 2
src/freedombone-app-privatebin Dosyayı Görüntüle

@@ -54,10 +54,9 @@ function secure_privatebin {
54 54
 
55 55
     find "${pbpath}/" -type f -print0 | xargs -0 chmod 0640
56 56
     find "${pbpath}/" -type d -print0 | xargs -0 chmod 0550
57
-    find "${pbdata}/" -type f -print0 | xargs -0 chmod 0640
58
-    find "${pbdata}/" -type d -print0 | xargs -0 chmod 0750
59 57
 
60 58
     chown -R ${rootuser}:${htgroup} "${pbpath}/"
59
+    chown -R www-data:www-data ${pbdata}
61 60
 }
62 61
 
63 62
 function logging_on_privatebin {
@@ -442,6 +441,8 @@ function install_privatebin {
442 441
     sed -i 's|sizelimit =.*|sizelimit = 32768|g' /var/www/$PRIVATEBIN_DOMAIN_NAME/htdocs/cfg/conf.php
443 442
     sed -i 's|defaultformatter =.*|defaultformatter = "markdown"|g' /var/www/$PRIVATEBIN_DOMAIN_NAME/htdocs/cfg/conf.php
444 443
 
444
+    mkdir -p /var/www/$PRIVATEBIN_DOMAIN_NAME/htdocs/data
445
+
445 446
     secure_privatebin
446 447
 
447 448
     systemctl restart php7.0-fpm