skip to Main Content

I use the tensorflow based program luminoth for object detection. To execute luminoth while it is installed on a server i use php. When luminoth starts the prediction, it creates a file named objects.json. In the end, it writes the result in this objects.json file. But when i execute it via php the prediction stops before writing the result. The permissions of the objects.json file are -rw-r--w--

I think it is because this permissions do not allow luminoth to write the result in this file. Do you think I am right? I tried to set permissions like

chmod 2777 /var/www/html

to test, but it does not work.
I wrote in my sudoers file:

%www-data ALL=(ALL) NOPASSWD:ALL

I hope that I am right. Do you have any ideas?

Thanks!

2

Answers


  1. Try this (change path accordingly

    sudo chmod 777 -R /var/www/html/{path}/objects.json
    
    Login or Signup to reply.
  2. First, touch the file:

    touch objects.json
    

    Then give only the permission it really needs:

    chmod 644 objects.json
    

    Maybe if you need, also set the correct owner:

    chown user:group objects.json
    

    Then execute your script:

    php bin/run.php
    

    Don’t pass chmod 777 tryhard getting something to work. Use only the permission you need.

    enter image description here

    *) Image source: http://thisismao.com/wordpress/the-777-developer/

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search