Send Motion-user mailing list submissions to motion-user@lists.sourceforge.net
To subscribe or unsubscribe via the World Wide Web, visit https://lists.sourceforge.net/lists/listinfo/motion-user or, via email, send a message with subject or body 'help' to motion-user-requ...@lists.sourceforge.net You can reach the person managing the list at motion-user-ow...@lists.sourceforge.net When replying, please edit your Subject line so it is more specific than "Re: Contents of Motion-user digest..." Today's Topics: 1. Re: Can't set group write permission for directories/files created by motion (Henk Demper) 2. Re: Can't set group write permission for directories/files created by motion (Damian) 3. Re: Can't set group write permission for directories/files created by motion (Damian) ---------------------------------------------------------------------- Message: 1 Date: Tue, 29 Dec 2020 16:16:14 +0100 From: Henk Demper <henk_dem...@hotmail.com> To: Motion discussion list <motion-user@lists.sourceforge.net> Subject: Re: [Motion-user] Can't set group write permission for directories/files created by motion Message-ID: <as8pr10mb43739d61b45a97236723ae4893...@as8pr10mb4373.eurprd10.prod.outlook.com> Content-Type: text/plain; charset="us-ascii" Hello Damian, Thanks for your swift reply. I was currently starting the motion service the 'classical' way using /etc/init.d/motion, not systemctl as in your [1] and [2]. Triggered by your reply to change umask for the daemon only (not per user or all non-privileged logins) I stumbled over https://serverfault.com/questions/166176/ways-to-set-umask-on-ubuntu-for-daemon-processes <https://serverfault.com/questions/166176/ways-to-set-umask-on-ubuntu-for-daemon-processes> in which the last reply ads the --umask option to /etc/init.d/motion as follows: if start-stop-daemon --start --oknodo --exec $DAEMON -b --chuid motion --umask 002 ; then in the start) case. After making this change and restarting motion, starting with an empty directory (no Log.txt, sub-directories or video files), this does solve the issue for files: they are now created with 664 instead of 644 permission. But any created directory still has the 755 instead of the expected 775 permission, as if directory permissions do not follow the umask setting. Then to follow your exact suggestion using systemctl: I disabled the daemon in /etc/default/motion and /etc/motion/motion.conf. I switched to systemctl by copying motion.service to /etc/systemd/system/motion.service, adding UMask=0002 in [Service] section, setting autostart of motion with 'sudo systemctl enable motion'. Finally cleaned all files and restarted. That all worked as expected, but again the files get permission 664 (good), but directories still will be created with 755 (bad)... So I can not yet delete files inside the directories, unless I add group write permission to these directories... Any idea why that could be ? Thanks again ! Henk Demper > On 29 Dec 2020, at 7:39, Damian via Motion-user > <motion-user@lists.sourceforge.net> wrote: > > Have a look at debian/motion.service inside [1], add UMask=0002 to the > [Service] section. Stop your running motion, save the supplemented > motion.service as [2], issue systemctl daemon-reload, and start motion again. > >> What am I doing wrong, how can I solve this ? Perhaps this is not 100% >> motion related, but more general linux, but it seemed appropriate to post >> here, as I assume I might not be the only one in this situation. > [1] > http://deb.debian.org/debian/pool/main/m/motion/motion_4.3.2-1.debian.tar.xz > [2] /etc/systemd/system/motion.service > > > _______________________________________________ > Motion-user mailing list > Motion-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/motion-user > https://motion-project.github.io/ > > Unsubscribe: https://lists.sourceforge.net/lists/options/motion-user -------------- next part -------------- An HTML attachment was scrubbed... ------------------------------ Message: 2 Date: Tue, 29 Dec 2020 17:52:42 +0100 From: Damian <motion-u...@arcsin.de> To: motion-user@lists.sourceforge.net Subject: Re: [Motion-user] Can't set group write permission for directories/files created by motion Message-ID: <81edd31a-8f27-9af5-cf0c-fe07b81c5...@arcsin.de> Content-Type: text/plain; charset=windows-1252; format=flowed Oh well, for directories you are out of luck. The motion-internal mycreate_path() function uses 0750. > So I can not yet delete files inside the directories, unless I add group > write permission to these directories... > > Any idea why that could be ? ------------------------------ Message: 3 Date: Tue, 29 Dec 2020 18:33:38 +0100 From: Damian <motion-u...@arcsin.de> To: motion-user@lists.sourceforge.net Subject: Re: [Motion-user] Can't set group write permission for directories/files created by motion Message-ID: <4a13a846-976b-2679-a9dc-fb97dbf2b...@arcsin.de> Content-Type: text/plain; charset=utf-8; format=flowed Correction, 0755 not 0750, but that does not change things. > The motion-internal mycreate_path() function uses 0750. ------------------------------ ------------------------------ Subject: Digest Footer _______________________________________________ Motion-user mailing list Motion-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/motion-user ------------------------------ End of Motion-user Digest, Vol 174, Issue 11 ********************************************