简体   繁体   中英

Elastic Beanstalk Permission Denied

I've an PHP Laravel application deployed on Elastic Beanstalk. On a specific page, I've have an error showing up. I went to my logs and the error is related to accessing a third party component: krpano panorama viewer.

sh: /var/app/current/krpano-1.19-pr8/krpanotools: Permission denied

These are the commands that I execute in ebextension config file.

container_commands:
    01change_permissions:
        command: chmod 777 /var/app/current/krpano-1.19-pr8
    02change_permissions:
        command: chmod +x /var/app/current/krpano-1.19-pr8/krpanotools
    03change_permissions:
        command: chmod +x "/var/app/current/krpano-1.19-pr8/krpano Tools.sh"

The line where I consume the component (working locally):

 $command = base_path()."/krpano-1.19-pr8/krpanotools sphere2cube view ".$upload_dir.$photo_id.".jpg ".$upload_dir."preview/".$photo_id.".jpg 0 0 0 75 -outsize=1920x1080"; 

Does anyone have a clue what can be done different?

Thanks in advance.

It seems that the previous commands were right, I just needed to register the component with the following line.

command: sudo -u www-data ./krpanotools register Licensexxxxxxxxxx

Thanks anyway.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM