Laravel Permissions Alphahttps://gitlab.com/mikerockett/laravel-permissions
Lighning-fast command line tool that sets the correct permissions on a Laravel project in a Linux environment.
Run with V
$ v run laravel_permissions.v
- Type in the owner domain-user
- Type in the web server user group (defaults to www-data)
- Watch it fly:
running preflight checksos supportedrunning as rootpreflight checks complete answer the following prompts, or type exit, quit, or q to quit.? owner user (domain-user) required domain.com? group (web-server user) www-data→ adding owner to web-server group…→ applying group and owner to /home/domain.com/www…→ setting file permissions to 660…→ setting directory permissions to 2770…→ setting web-server group on storage and bootstrap/cache directories…→ setting ug+rwx permissions on storage and bootstrap/cache directories…done.
Build for Production
$ v -prod -os linux
This will create a binary called
You can now dump this binary on your server however you see fit.
- Get the domain-user home directory instead of hard-coding to
- Ask for the document root instead of hard-coding to
swap out the is_dir check for a validator once closure support has been added to vlang.
- Allow environment variables or vargs to set permission modes instead of hard-coding to
2770(although, this might not be necessary)
Published 18 July 2021 in Laravel