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 Motion be run without using sudo (Ted Romer)


----------------------------------------------------------------------

Message: 1
Date: Tue, 16 Jul 2019 14:24:41 -0500
From: Ted Romer <li227...@gmail.com>
To: Motion discussion list <motion-user@lists.sourceforge.net>
Subject: Re: [Motion-user] can Motion be run without using sudo
Message-ID: <318b3730-63f8-4f07-88af-09f399af6...@gmail.com>
Content-Type: text/plain; charset="utf-8"

With Motion 4.1.1, does the mmalcam option (I am using a PiCam) still work? I 
was reading the Basic Setup page for Motion on the GitHub site 
(motion-project.github.io) and it said for using Motion installed by apt to use 
the bcm2835-v4l2 module (sudo modprobe bcm2835-v4l2). If I should be using the 
module, is loading it a once and done thing or do I need to load it after each 
restart of the Pi?

Thanks.

Ted


> On Jul 15, 2019, at 7:18 PM, Jack Christensen <christensen.jac...@gmail.com> 
> wrote:
> 
> Hi Ted,
> 
> To start Motion on reboot, I have "@reboot motion" in my crontab.
> 
> I wrote a couple simple scripts to operate three camera machines and a fourth 
> machine (also a Pi Zero) that serves to archive the captured videos.
> 
> One script just uses rsync to send the video files to the archive machine. 
> This runs on the three camera machines, and is started by the on_movie_end 
> parameter in the config file.
> 
> A second script runs once a day on the archive machine, started by cron. It 
> creates a directory, moves all the video files collected that day to it, 
> stops Motion on the camera machines, deletes all videos on the camera 
> machines and retrieves the motion log, then restarts Motion.
> 
> The whole setup has worked quite well.
> Jack
> 
> 
> On 7/15/19 7:57 PM, Ted Romer wrote:
>> Putting the pid file and log in the home directory is a good idea.
>> 
>> Do you have Motion set to start on reboot? If so, how do you configure it? I 
>> have three Pis running Motion and I have a call in rc.local to start Motion 
>> on reboot. That gets Motion restarted when the power goes out.
>> 
>> Ted
>> 
>> Sent from my iPad
>> 
>> On Jul 15, 2019, at 6:23 PM, Jack Christensen <christensen.jac...@gmail.com 
>> <mailto:christensen.jac...@gmail.com>> wrote:
>> 
>>> I've been running Motion on several Pi Zero W machines without sudo. I like 
>>> to create my own user (jack) instead of using pi but I think pi should work 
>>> the same.
>>> 
>>> The config file is /home/jack/.motion/motion.conf
>>> 
>>> Log and pid files are in my home directory. In the config file I have:
>>> 
>>> daemon on
>>> setup_mode off
>>> pid_file /home/jack/motion.pid
>>> log_file /home/jack/motion.log
>>> I start motion just with a simple "motion" command.
>>> 
>>> Works very well.
>>> 
>>> 
>>> On 7/15/19 6:51 PM, Ted Romer wrote:
>>>> Hi all,
>>>> 
>>>> Thanks for the suggestions. Unfortunately, none have worked. I tried 
>>>> editing /etc/default/motion and setting it to ?yes? (without the quotes) 
>>>> and then I issued the command ?sudo systemctl enable motion? (without the 
>>>> quotes) and then rebooted. Motion failed to start. This is what I got when 
>>>> I typed sudo systemctl status motion
>>>> 
>>>> Jul 15 17:33:39 sPiCam2 systemd[1]: Starting LSB: Start Motion detection...
>>>> Jul 15 17:33:42 sPiCam2 motion[257]: Starting motion detection daemon: 
>>>> motion.
>>>> Jul 15 17:33:43 sPiCam2 systemd[1]: Started LSB: Start Motion detection.
>>>> Jul 15 17:33:50 sPiCam2 motion[329]: [17090184:motion] [NTC] [ALL] 
>>>> conf_load: Processing thread 0 - config file /etc/motion
>>>> Jul 15 17:33:50 sPiCam2 motion[329]: [17090184:motion] [ALR] [ALL] 
>>>> conf_cmdparse: Unknown config option "mmalcam_name"
>>>> Jul 15 17:33:50 sPiCam2 motion[329]: [17090184:motion] [NTC] [ALL] 
>>>> motion_startup: Motion 4.1.1 Started
>>>> Jul 15 17:33:50 sPiCam2 motion[329]: [17090184:motion] [ERR] [ALL] 
>>>> myfopen: Error opening file /var/log/motion/motion.log w
>>>> Jul 15 17:33:50 sPiCam2 motion[329]: [17090184:motion] [EMG] [ALL] 
>>>> motion_startup: Exit motion, cannot create log file /var
>>>> 
>>>> Every time I try to get it to run as a service I get the file permissions 
>>>> error on /var/log/motion/motion.log
>>>> 
>>>> It runs okay when I use "sudo motion -c /.motion/motion.conf"    or   " 
>>>> sudo motion -c /etc/motion/motion.conf?   (Ihave the motion.conf file in 
>>>> both locations
>>>> 
>>>> Ted
>>>> 
>>>> 
>>>> 
>>>>> On Jul 15, 2019, at 2:40 PM, Allan Peda <bizco...@gmail.com 
>>>>> <mailto:bizco...@gmail.com>> wrote:
>>>>> 
>>>>> Be sure SELinux is off before you start adjusting permissions.  I am 
>>>>> running motion with it enabled, but permissions are trickier when it's 
>>>>> set to enforcing.
>>>>> 
>>>>> Here's an article explaining:
>>>>> https://www.tecmint.com/disable-selinux-temporarily-permanently-in-centos-rhel-fedora/
>>>>>  
>>>>> <https://www.tecmint.com/disable-selinux-temporarily-permanently-in-centos-rhel-fedora/>
>>>>> 
>>>>> As to the service, in a modern distro, the systemd subsystem controls why 
>>>>> user "owns" a given service.
>>>>> https://askubuntu.com/questions/676007/how-do-i-make-my-systemd-service-run-via-specific-user-and-start-on-boot#676022
>>>>>  
>>>>> <https://askubuntu.com/questions/676007/how-do-i-make-my-systemd-service-run-via-specific-user-and-start-on-boot#676022>
>>>>> 
>>>>> You'll need to master commands chown, and chmod to get those files 
>>>>> writeable without destroying security.
>>>>> 
>>>>> 
>>>>> On Sun, Jul 14, 2019 at 11:48 PM Ted Romer <li227...@gmail.com 
>>>>> <mailto:li227...@gmail.com>> wrote:
>>>>> I upgraded one of my systems and I am trying to see if I can run Motion 
>>>>> without sudo. I have a Pi Zero W with Buster Lite and Motion 4.1.1. I 
>>>>> have been starting Motion on my systems with sudo but I would like to see 
>>>>> if I can get it to run without sudo. My user account is pi. If I try to 
>>>>> run Motion as pi it fails out due to lack of permission to write to 
>>>>> /var/log/motion/motion.log and also cannot create the pid file. If I try 
>>>>> to get Motion to start as a service I get file permissions errors on 
>>>>> /var/log/motion/motion.log. When I start motion with sudo, my jpg and 
>>>>> video files are created with root as the owner. I am having the files 
>>>>> saved in a directory in pi?s home directory.
>>>>> 
>>>>> I have been searching for information pertaining to how to configure and 
>>>>> deal with the permissions issues but have not found a solution. Is there 
>>>>> a way to do it without sudo?
>>>>> 
>>>>> Thanks.
>>>>> 
>>>>> Ted
>>>>> 
>>>>> _______________________________________________
>>>>> Motion-user mailing list
>>>>> Motion-user@lists.sourceforge.net 
>>>>> <mailto:Motion-user@lists.sourceforge.net>
>>>>> https://lists.sourceforge.net/lists/listinfo/motion-user 
>>>>> <https://lists.sourceforge.net/lists/listinfo/motion-user>
>>>>> https://motion-project.github.io/ <https://motion-project.github.io/>
>>>>> 
>>>>> Unsubscribe: https://lists.sourceforge.net/lists/options/motion-user 
>>>>> <https://lists.sourceforge.net/lists/options/motion-user>_______________________________________________
>>>>> Motion-user mailing list
>>>>> Motion-user@lists.sourceforge.net 
>>>>> <mailto:Motion-user@lists.sourceforge.net>
>>>>> https://lists.sourceforge.net/lists/listinfo/motion-user 
>>>>> <https://lists.sourceforge.net/lists/listinfo/motion-user>
>>>>> https://motion-project.github.io/ <https://motion-project.github.io/>
>>>>> 
>>>>> Unsubscribe: https://lists.sourceforge.net/lists/options/motion-user 
>>>>> <https://lists.sourceforge.net/lists/options/motion-user>
>>>> 
>>>> 
>>>> 
>>>> _______________________________________________
>>>> Motion-user mailing list
>>>> Motion-user@lists.sourceforge.net 
>>>> <mailto:Motion-user@lists.sourceforge.net>
>>>> https://lists.sourceforge.net/lists/listinfo/motion-user 
>>>> <https://lists.sourceforge.net/lists/listinfo/motion-user>
>>>> https://motion-project.github.io/ <https://motion-project.github.io/>
>>>> 
>>>> Unsubscribe: https://lists.sourceforge.net/lists/options/motion-user 
>>>> <https://lists.sourceforge.net/lists/options/motion-user>_______________________________________________
>>> Motion-user mailing list
>>> Motion-user@lists.sourceforge.net <mailto:Motion-user@lists.sourceforge.net>
>>> https://lists.sourceforge.net/lists/listinfo/motion-user 
>>> <https://lists.sourceforge.net/lists/listinfo/motion-user>
>>> https://motion-project.github.io/ <https://motion-project.github.io/>
>>> 
>>> Unsubscribe: https://lists.sourceforge.net/lists/options/motion-user 
>>> <https://lists.sourceforge.net/lists/options/motion-user>
>> 
>> 
>> _______________________________________________
>> Motion-user mailing list
>> Motion-user@lists.sourceforge.net <mailto:Motion-user@lists.sourceforge.net>
>> https://lists.sourceforge.net/lists/listinfo/motion-user 
>> <https://lists.sourceforge.net/lists/listinfo/motion-user>
>> https://motion-project.github.io/ <https://motion-project.github.io/>
>> 
>> Unsubscribe: https://lists.sourceforge.net/lists/options/motion-user 
>> <https://lists.sourceforge.net/lists/options/motion-user>_______________________________________________
> 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...

------------------------------



------------------------------

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 157, Issue 15
********************************************

Reply via email to