Jump to content

sibianul

Members
  • Posts

    21
  • Joined

  • Last visited

Reputation Activity

  1. Like
    sibianul got a reaction from manuti in Installing FTP server bananaPi M1   
    Thanks for your advices, it was quite easy to setup the ftp using your instructions, I also created a new user and setup the user home directory inside /var/www/html/security_camera_storage.  The camera is saving new images each time there is motion, my only problem so far is how other users can access those images? 
     
    I tried to create a php script to scan the directory where images are saved but it seems it fails as the directory is owned by user securitycam, and php is running with a different user. I want to setup some cronjobs to scan and delete old files (let's say, I will delete every image older than 3 days), I will also need to display the images in my dashboard, so I will definitely need to find a fix to this "issue"
     
    The other files in html folder are owned by admin user.
     
    Any advices on how to setup the ftp to save files that can be accessed by admin user, are welcome
     
    Thank you.
     
    UPDATE
     
    I have added user admin to group secuirtycam, but still didn't help:
     
    sudo usermod -a -G securitycam admin
    sudo chgrp -R securitycam /var/www/html/security_camera_storage
     
    After seeing that PHP still can't access that folder, I changed the permissions of that folder to 777. Is this such a bad thing? even if this bananaPi is a local device, obody else has access to this pi, just me.
     
    sudo chmod -R 777 /var/www/html/security_camera_storage
     
    This way it scans the folder, but unfortunately newly added files, are still not accessible, the main folder is accessible, PHP script is seeing all the files, even the new ones, but when I try to display them in a webpage, the images are not shown. So I still need to fix this, the proper way
     
    Thank you.
     



×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines