Thank you for all the suggestions. I need to take my linux-fu a lot. Before I can move forward, I have a problem on my weather station Pi. On my 'dev' Pi this wget command works as expected wget --user=user --password=user http://192.168.254.33/jpg/image.jpg?size=3 -O/home/pi/Pictures/image.jpg works as expected
When I run the same wget command on my weather station Pi I get an error message :schema Missing from wget. it makes the file but there isn't any data in the file. if I put the URL into a browser window I get the image I expect. if it matters, I am running WeeWX directly. I believe both Pi's have the same version of the operating system and I didn't change any permissions. I'm out of ideas... On Monday, November 23, 2020 at 10:03:46 AM UTC-6 sali...@gmail.com wrote: > hello, > > here, what I did to capture a video image and put it on the RPi server > with the belchertown skin. I used an intermediate server, here a NAS. > (freeNas). > 1- Samsung Camera ----> FTP ----> Freenas. > 2 - SCP transfer from RPi (weewx) ---> FreeNas -> / home / pi / > transfer-images / "capture name" > 3 - script to rename "capture name" ---> new name.jpg > 4- cp "new name.jpg" ---> / var / www / html / weewx / belchertown / > images / > 5- to automate everything, this I created a batch that I put in crontab. > > Patrick > Le 23/11/2020 à 15:35, Greg Sinclair a écrit : > > I do this by doing all the processing on the Pi capturing the image and > then doing a sftp to place the image where weewx can find it. > > Greg > > On Sunday, November 22, 2020 at 1:47:33 PM UTC-6 Rich Strle wrote: > >> Thanks very much Vince. >> >> I appreciate your advice on the Linux Fundamentals course. >> >> Rich Strle >> 309-824-9213 <(309)%20824-9213> >> >> On Sun, Nov 22, 2020 at 12:34 PM vince <vince...@gmail.com> wrote: >> > >> > On Sunday, November 22, 2020 at 8:44:01 AM UTC-8 Rich Strle wrote: >> >> >> >> Looking at my passwrd file I see: >> www-data:x:33:33:www-data:/var/www:/usr/sbin/nologin >> >> Would I remove the /nologin? >> >> >> > >> > Please don't do that. >> > >> > www-data is the owner of the web 'data' and your webserver process >> likely runs as that user. >> > The nologin there ensures that if anybody/anything breaks security on >> your webserver running process, then they still wouldn't be able to get a >> shell and install/run malware etc. >> > >> > What you want to do is: >> > >> > put all your processing in a script >> > run that script as the non-privileged user 'pi' and write to scratch >> directories that pi can write to (/tmp or /var/tmp are likely places) >> > in your script, do the 'privileged' copy of the output file to the >> /var/www/html directory by prefacing your 'cp' command ala 'sudo cp' >> > and you'll likely want to set the permissions on the file in >> /var/www/html also with 'sudo chmod' >> > >> > (standard suggestion - if you're asking this you need to up your >> linux-fu a little - I always suggest looking at the free edx.org Linux >> Fundamentals course that literally a million folks have taken) >> > >> > A simple script that grabs Google's logo image as an example would look >> something like: >> > >> > #!/bin/bash >> > UPSTREAM_URL=" >> https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png" >> >> >> > SCRATCH_FILE="/tmp/image.jpg" >> > FINAL_OUTPUT="/var/www/html/image.jpg" >> > >> > # wget the file in quiet mode to a temporary location >> > wget -q "${URL}" "${SCRATCH_FILE}" >> > >> > # copy it into place and fix up permissions via sudo >> > sudo cp "${SCRATCH_FILE}" "${FINAL_OUTPUT}" >> > sudo chown www-data "${FINAL_OUTPUT}" >> > sudo chmod 644 "${FINAL_OUTPUT}" >> > >> > This script did the right thing for me, FWIW. You'll of course have to >> put in the right wget switches to grab your image from the camera, as well >> as doing any processing with ImageMagick etc. before you copy your image >> into the web tree, but this should give you a skeleton to start with that >> does the permission stuff... >> > >> > >> > -- >> > You received this message because you are subscribed to a topic in the >> Google Groups "weewx-user" group. >> > To unsubscribe from this topic, visit >> https://groups.google.com/d/topic/weewx-user/979HfPDddwc/unsubscribe. >> > To unsubscribe from this group and all its topics, send an email to >> weewx-user+...@googlegroups.com. >> > To view this discussion on the web visit >> https://groups.google.com/d/msgid/weewx-user/ca47e7f4-cdd5-4989-92f1-6af8d1a154dan%40googlegroups.com. >> >> >> > -- > > 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+...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/weewx-user/6b532573-933d-4e1b-b010-c54f4b8ee483n%40googlegroups.com > > <https://groups.google.com/d/msgid/weewx-user/6b532573-933d-4e1b-b010-c54f4b8ee483n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > -- 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/bcbfc232-168a-41ae-b6bc-fcf0795b397dn%40googlegroups.com.