Coder Social home page Coder Social logo

laraperms's Introduction

Laraperms

A simple bash script to apply file/folder permissions to a Laravel 5.x website

How to use:

Option A: You can run this as a simple bash script such as:

$ bash laraperms.sh /var/www/mysite.com

Option B: Copy script to /usr/bin for global usage

$ sudo mv laraperms.sh /usr/bin/laraperms
$ sudo chmod +x /usr/bin/laraperms
$ laraperms /var/www/mysite.com
  • You can either specify the path to the root folder of the project as an argument such as....
  • $ laraperms /var/www/mysite.com/
  • Or if no argument is specified you have the option to use the current working directory
  • This script will do the following.....

-Chown the directory as the following USER:www-data

-Apply 644 to files

-Apply 755 to directories

-Apply write and execute permissions to /path/to/site/storage & /path/to/site/bootstrap/cache

  • NOTE: Script does not use "sudo". You should make sure your user owns the directory you are trying to run this program on.
  • If your getting a permission error use "sudo chown -R YOURUSER:www-data /path/to/site" before using this script.

laraperms's People

Contributors

kryp7ik avatar

Stargazers

djdagovs avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.