RPi_Cam_Web_Interface
RPi_Cam_Web_Interface copied to clipboard
cam subfolder leads to error when running install.sh
Hello, When I run ./install.sh the default for cam subfolder is "html" However when the installation runs, I only get error message saying "no permissions". What is the use of this subfolder ? Is it necessary for the use of the appli and the camera, or is it use for storage of pictures and videos ? Is it better to give permissions to html folder ? I'm lost with this option which is not really documented in installation guide. Thanks in advance for help ! Pierre
the default subfolder is as you say html. An installation with this should normally be fine. I don't know why you got a permissions error. Did you already have an Apache install before running the install script? if so then maybe the permissions were incorrect before it started.
You can use any subfolder you like or none at all if you blank it out when running install. I actually normally do that myself as it means one can just the use ip address as the url instead of say ip/html if you use an html subfolder.
The main reason for choosing to use a subfolder is to separate out the camera web stuff from anything else the web server is being used for.
The way to check the permissions is to ls -l /var
you should get a line like drwxr-xr-x 10 www-data www-data 4096 Jan 30 18:00 www
which indicates the www folder is owned by the user www-data
Hi, Thanks for this precious info. However if I create a new subfolder in /var/www when I run install I stil have same permission deny. he user is always www-data and I'm connected as pi. And I don't see how to give permissions to pi on the subfolders...
Install.sh creates lot of files in the newly created subfolder, but the same issue occurs when install tries to install files in the subdirectory "macro". Always "permissions denied". I begin to think that this appli as not done for use on a raspberry 3B using Raspbian Bullseye.
This app runs fine on all Raspberry models from zeroV1 up to Pi4. One of my cameras is on a Pi3B. Bullseye also works OK but because this OS has disabled the legacy MMAL support that this app uses then this has to be renabled. The install script does this automatically. Buster still has the MMAL support ; the script detects this and does not have to do this step.
You should not create a subfolder yourself. If you just name the subfolder then the install script will create it with the right permissions and then copy all the web server files into it.
www-data is the user account used by the web server to restrict its access to files outside as a security measure. User pi can read what's under the web server but can't write there unless its given root permissions with the sudo command. That should be unnecessary for normal operation.
If you are still having problems then I recommend starting from a clean OS install and then let the install.sh do all the work. This has been tested on lots of Raspberry systems.
I've installed a new raspbian version lite (bullseye). I"ve activated the legacy camera.
I still encounter issues with permissions denied on the macro subfolder
sh: 1: /var/www/html/macros/error_hard.sh: Permission denied
mmal: mmal_vc_component_enable: failed to enable component: ENOSPC
Also when I connect to the server by RPI ip_addess/html I get the page of the appli, but with error message about P
Raspimjpeg. I tried to launch the commands but always get errors.
hereunder is the screenshot
I've again created another raspbian vesrion : Buster instead of Bullseye. with this version and with camera activated in raspi-config the installation worked without any issue and tha appli works fine !`
OK. Good that you got it working under Buster.
It does what work under Bullseye which requires the legacy camera support but you should not try to enable that manually; you should just let the script do the work.
I'll perhap make other tries with Bullseye when I'll have time to do that. I had already tried with enabling Camera legacy manually in raspi-config, and also without enabling it. But in the 4 tries I made, I never succeed to get system working under Bullseye.
Next step for me : configure and use PIR. When all will be Ok, I'll insert everything in an outdoor case dedicated to wildlife watching ! Thanks a lot for your precious help. Pierre
I had a notification email that you were getting raspimjpeg error but the comment is not showing up here for some reason.
First step is to check the ribbon cables to camera as this is a common cause of this fault. Also check and press down the mini ribbon cable on the camera module itself. Second issue can be if power supply is marginal as the extra power drawn by the camera can make the connection unreliable.
Hi Robert, You're true. I had deleted my message because I had found the source of the issue. I think that it was due to the small micro ribbon near from the lens. The componet was not completely pushed in its socket. I also reajusted the cable on the raspi socket. I thought that the issue could be due to a corrupted component in the OS and app and hed recreated a clear one, but issue was still there. I made a test with anoter video capture program that I also use (motioneye), but the vue of the camera was not correct too. Then I checked the ribbons ans sockets and after readjust all the issue was left. Then I deleted the comment in order not to disturb with false error source !
The screenshot was this one 👍