text Permisos proyecto laravel

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了text Permisos proyecto laravel相关的知识,希望对你有一定的参考价值。

Webserver as owner (the way most people do it):

assuming www-data is your webserver user.

   sudo chown -R www-data:www-data /path/to/your/laravel/root/directory
if you do that, the webserver owns all the files, and is also the group, and you will have some problems uploading files or working with files via FTP, because your FTP client will be logged in as you, not your webserver, so add your user to the webserver user group:

  sudo usermod -a -G www-data ubuntu
Of course, this assumes your webserver is running as www-data (the Homestead default), and your user is ubuntu (it's vagrant if you are using Homestead).

Then you set all your directories to 755 and your files to 644... SET file permissions

sudo find /path/to/your/laravel/root/directory -type f -exec chmod 644 {} \;    
SET directory permissions

sudo find /path/to/your/laravel/root/directory -type d -exec chmod 755 {} \;
Your user as owner

I prefer to own all the directories and files (it makes working with everything much easier), so I do:

sudo chown -R my-user:www-data /path/to/your/laravel/root/directory
Then I give both myself and the webserver permissions:

sudo find /path/to/your/laravel/root/directory -type f -exec chmod 664 {} \;    
sudo find /path/to/your/laravel/root/directory -type d -exec chmod 775 {} \;
Then give the webserver the rights to read and write to storage and cache

Whichever way you set it up, then you need to give read and write permissions to the webserver for storage, cache and any other directories the webserver needs to upload or write too (depending on your situation), so run the commands from bashy above :

sudo chgrp -R www-data storage bootstrap/cache
sudo chmod -R ug+rwx storage bootstrap/cache
Now, you're secure and your website works, AND you can work with the files fairly easily

以上是关于text Permisos proyecto laravel的主要内容,如果未能解决你的问题,请参考以下文章

text 加载webextra - levantar proyecto

text CREAR PROYECTO AGAVE

text Clonar proyecto de Laravel

text Estructura de proyecto para angular

text Tercer Paso:Adicionando Archivo是一间客房Proyecto

text Segundo Paso:IniciandounRepositórioGiten Carpeta de Proyecto