aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xboot.php15
-rw-r--r--include/attach.php4
2 files changed, 17 insertions, 2 deletions
diff --git a/boot.php b/boot.php
index aa56aff3d..99ec5de32 100755
--- a/boot.php
+++ b/boot.php
@@ -91,6 +91,21 @@ define ( 'LANGUAGE_DETECT_MIN_CONFIDENCE', 0.01 );
/**
+ * Default permissions for file-based storage (webDAV, etc.)
+ * These files will be owned by the webserver who will need write
+ * access to the "storage" folder.
+ * Ideally you should make this 700, however some hosted platforms
+ * may not let you change ownership of this directory so we're
+ * defaulting to both owner-write and group-write privilege.
+ * This should work for most cases without modification.
+ * Over-ride this in your .htconfig.php if you need something
+ * either more or less restrictive.
+ */
+
+define ( 'STORAGE_DEFAULT_PERMISSIONS', 0770 );
+
+
+/**
*
* An alternate way of limiting picture upload sizes. Specify the maximum pixel
* length that pictures are allowed to be (for non-square pictures, it will apply
diff --git a/include/attach.php b/include/attach.php
index 2f77460a4..0c748cba6 100644
--- a/include/attach.php
+++ b/include/attach.php
@@ -532,7 +532,7 @@ function attach_mkdir($channel,$observer_hash,$arr = null) {
$basepath = 'store/' . $channel['channel_address'];
if(! is_dir($basepath))
- @mkdir($basepath,0700,true);
+ @mkdir($basepath,STORAGE_DEFAULT_PERMISSIONS,true);
if(! perm_is_allowed($channel_id, get_observer_hash(),'write_storage')) {
@@ -619,7 +619,7 @@ function attach_mkdir($channel,$observer_hash,$arr = null) {
);
if($r) {
- if(mkdir($path,0700)) {
+ if(mkdir($path,STORAGE_DEFAULT_PERMISSIONS)) {
$ret['success'] = true;
$ret['data'] = $arr;
}