I am doing something similar

What I did was run that under www-data user.  First I had to change the 
shell in /etc/passwd to look like this.

www-data:x:1028:33:www-data:/var/www:/bin/bash

once that is done you can sudo su - www-data and add the cron entry.

Another way would be to add the pi user to the www-data group and mess with 
the directory permissions.

On Sunday, November 22, 2020 at 9:06:21 AM UTC-5 Rich Strle wrote:

> My copy of weewx is running on a Raspberry Pi. I am trying to get an image 
> from a webcam on my local network using wget, resizing the image using 
> imagemagick, then put it in the /var/www/html/weewx/ folder so it will get 
> uploaded to my web host.
>
> wget --user=user --password=user  
> http://192.168.254.33/jpg/image.jpg?size=3 -O/var/www/html/weewx/image.jpg
>
> I get a Permission denied error.
>
> From there my plan was to use imagick to reduced the size of the file and 
> include the image in the upload.
>
> I as able to put this in a bash script and run a cron job to do this 
> process to my /home/pi/Pictures/image.jpg folder but I can''t figure out 
> how to copy the file to the html/weewx directory.
>
> If there is a better way to do what I'm trying to accomplish I'm willing 
> to try that.
>
> Thanks in advance.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/a8a3f9c1-d971-4b7d-9952-283f5c4a6ebbn%40googlegroups.com.

Reply via email to