On 2016-01-22 16:49, Ximin Luo wrote:
> Try this: uninstall motion, then `sudo deluser motion`. This should
> also automatically delete the motion group as well. If it doesn't
> also run `sudo deluser --group motion`.
> 
> Then when you reinstall motion, that directory should be created by
> `adduser` when it creates the motion user again. (It is created
> motion:motion; if you want motion:adm instead you should probably
> edit /etc/adduser.conf, see `man adduser.conf` for more details...)
> 
> I think what happened to you was that you purged motion (or otherwise
> removed /var/lib/motion) before. Am I right? The previous purge
> behaviour removed /var/lib/motion, which I fixed here: [1] but I
> didn't think about what would happen to users that had already done
> this.
> 
> To fix this, I will add some logic to the postinst to re-create the
> motion user's $HOME if it doesn't already exist *and* it's mentioned
> in motion.conf. This condition should allow us to avoid interfering
> where the sysadmin removed /var/lib/motion on purpose. Let me know if
> you think that will cause problems.
> 
> X
> 
> [1] 
> https://anonscm.debian.org/cgit/users/infinity0/motion.git/commit/?id=7a2c309b65400a24aa68bc502ff94f783e9536cb

I confirm that after removing the package and user as you have described,
and installation of the package afterwards, /var/lib/motion has appeared.

P.S. Is there any /etc/logrotate.d/motion script that should take care of
/var/log/motion/motion.log ?

-- 
With best regards,
Dmitry

Reply via email to