uasoft-indonesia / badaso

Laravel Vue headless CMS / admin panel / dashboard / builder / API CRUD generator, anything !
https://badaso.uatech.co.id
MIT License
1.21k stars 223 forks source link

Crud does not work in existing project when apache/www-data does not own the project files #541

Closed Dri372 closed 2 years ago

Dri372 commented 2 years ago

Describe the "bug" Save Crud does not work, the log error is : Uasoft\Badaso\Exceptions\OrchestratorHandlerNotFoundException: file_put_contents(/database/seeders/Badaso/CRUD/ScrsCRUDDataTypeAdded.php): Failed to open stream: Permission denied in /vendor/badaso/core/src/BadasoDeploymentOrchestrator.php:64

cause : database/seeders/Badaso is not writable by the group ( drwxr-xr-x ) AND in my dev host www-data (apache) is not the owner.

To Reproduce

  1. Install Badaso in an existing project 1.1 cd 1.2 composer require badaso/core 1.3 php artisan badaso:setup database/seeders/Badaso is created with the rights : drwxr-xr-x

same with :

Expected behavior rights should be : drwxrwxr-x Same when creating a project direcly with badaso

Workaround chmod -R g+w ...

rizkiheryandi commented 2 years ago

Yes web server should be able to write your project, it's not a bug

Also web server dont need to own the folder, just give write access in group user, and include the webserver user in the group

or you can use ACL https://www.youtube.com/watch?v=0KbP-yHSvVI for more advance linux permission

Dri372 commented 2 years ago

Also web server dont need to own the folder : Yes

chmod is not chown

just give write access in group user

chmod - to be done at the folder creation

Also for database/migrations/Badaso to be able to create a new table