From 653314c0ac317d1768cf03dd639c56de1eb4f8bc Mon Sep 17 00:00:00 2001 From: Chuck Scott Date: Tue, 5 Feb 2019 11:24:22 -0500 Subject: [PATCH] Added setting permissions to created media directories, added fileLibrary directory also. --- activate.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/activate.php b/activate.php index 86b660b8..55adf11b 100644 --- a/activate.php +++ b/activate.php @@ -110,16 +110,25 @@ class glmMembersPluginActivate extends glmPluginSupport // Check if uploads directory has a subdirectory for this plugin if (!file_exists(GLM_MEMBERS_PLUGIN_MEDIA_PATH)) { mkdir(GLM_MEMBERS_PLUGIN_MEDIA_PATH); + chmod(GLM_MEMBERS_PLUGIN_MEDIA_PATH, 02775); } // Check if media directory has a subdirectory for images if (!file_exists(GLM_MEMBERS_PLUGIN_IMAGES_PATH)) { mkdir(GLM_MEMBERS_PLUGIN_IMAGES_PATH); + chmod(GLM_MEMBERS_PLUGIN_IMAGES_PATH, 02775); } // Check if media directory has a subdirectory for files if (!file_exists(GLM_MEMBERS_PLUGIN_FILES_PATH)) { mkdir(GLM_MEMBERS_PLUGIN_FILES_PATH); + chmod(GLM_MEMBERS_PLUGIN_FILES_PATH, 02775); + } + + // Check if media directory has a subdirectory for file library + if (!file_exists(GLM_MEMBERS_PLUGIN_FILE_LIBRARY_PATH)) { + mkdir(GLM_MEMBERS_PLUGIN_FILE_LIBRARY_PATH); + chmod(GLM_MEMBERS_PLUGIN_FILE_LIBRARY_PATH, 02775); } return; -- 2.17.1