private function setPermissions()
    {
        if (!App::environment('production') || $this->option('force')) {
            $this->comment("Setting write permissions");
            foreach ($this->writableDirectories as $path) {
                $this->process->setCommandLine('chmod -R 0777 ' . base_path($path));
                $this->process->setTimeout(null);
                $this->process->run();

                if (!$this->process->isSuccessful()) {
                    $this->error("Could not set write permissions to " . $path);
                    break;
                }
            }

            $this->comment("Permissions set successfully");

            return $this;
        }else{
            $this->error("Write permissions can not be set in production environment. use --force option if you are really sure you want to proceed!");
        }
    }