Motion - Umask Group Permission
You are here: Foswiki>Motion Web>UmaskGroupPermission (25 Feb 2015, KennethBurgener)Edit Attach

Respect umask and allow group write permission on directories

Description of Patch

motion was not respecting umask (umask 0002) and allowing group write permission on directory creation. I made the following fix to allow this. (off of motion-3.2.12 source)
--- motion.c.old        2015-02-25 10:35:31.713336862 -0700
+++ motion.c    2015-02-25 10:35:07.256762369 -0700
@@ -2511,7 +2511,7 @@
 int create_path(const char *path)
 {
     char *start;
-    mode_t mode = S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH;
+    mode_t mode = S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH;

     if (path[0] == '/')
         start = strchr(path + 1, '/');

Installation of Patch

Download the patch file. If it is packed as a gz or tar.gz unpack it first. Then copy it to the motion source directory and issue the command (assuming the patch file is called filename_of_patch_file.diff)

patch < fix-umask-group-write.patch

Then re-build Motion and test the patch.

Change History of Patch

  • 1.0 Initial revision

Discussion and Comments


Topic revision: r1 - 25 Feb 2015, KennethBurgener
Copyright © 1999-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Please do not email Kenneth for support questions (read why). Use the Support Requests page or join the Mailing List.
This website only use harmless session cookies. See Cookie Policy for details. By using this website you accept the use of these cookies.