Fresh install Laravel with Sail, How do you fix permission issue - laravel

Created a Laravel project using this command:
$ curl -s https://laravel.build/example-app | bash
My username on my machine is tonysong:
$ ls -al
total 376
drwxr-xr-x 13 tonysong tonysong 4096 Agu 24 11:17 .
drwxrwxr-x 5 tonysong tonysong 4096 Agu 24 16:27 ..
drwxr-xr-x 7 tonysong tonysong 4096 Agu 22 20:26 app
-rwxr-xr-x 1 tonysong tonysong 1686 Agu 22 20:26 artisan
drwxr-xr-x 3 tonysong tonysong 4096 Agu 22 20:26 bootstrap
-rw-r--r-- 1 tonysong tonysong 1814 Agu 22 20:26 composer.json
-rw-r--r-- 1 tonysong tonysong 281237 Agu 24 11:17 composer.lock
drwxr-xr-x 2 tonysong tonysong 4096 Agu 22 20:26 config
drwxr-xr-x 5 tonysong tonysong 4096 Agu 22 20:26 database
-rw-r--r-- 1 tonysong tonysong 2894 Agu 24 11:17 docker-compose.yml
-rw-r--r-- 1 tonysong tonysong 258 Agu 22 20:26 .editorconfig
-rw-r--r-- 1 tonysong tonysong 1202 Agu 24 11:17 .env
-rw-r--r-- 1 tonysong tonysong 1075 Agu 24 11:17 .env.example
-rw-r--r-- 1 tonysong tonysong 179 Agu 22 20:26 .gitattributes
-rw-r--r-- 1 tonysong tonysong 203 Agu 22 20:26 .gitignore
drwxr-xr-x 3 tonysong tonysong 4096 Agu 22 20:26 lang
-rw-r--r-- 1 tonysong tonysong 285 Agu 22 20:26 package.json
-rw-r--r-- 1 tonysong tonysong 1105 Agu 24 11:17 phpunit.xml
drwxr-xr-x 2 tonysong tonysong 4096 Agu 22 20:26 public
-rw-r--r-- 1 tonysong tonysong 3977 Agu 22 20:26 README.md
drwxr-xr-x 5 tonysong tonysong 4096 Agu 22 20:26 resources
drwxr-xr-x 2 tonysong tonysong 4096 Agu 22 20:26 routes
drwxr-xr-x 5 tonysong tonysong 4096 Agu 22 20:26 storage
drwxr-xr-x 4 tonysong tonysong 4096 Agu 22 20:26 tests
drwxr-xr-x 40 tonysong tonysong 4096 Agu 24 11:17 vendor
-rw-r--r-- 1 tonysong tonysong 263 Agu 22 20:26 vite.config.js
but then I checked the permissions inside the docker:
$ sail shell
$ ls -al
total 376
drwxr-xr-x 13 root root 4096 Aug 24 04:17 .
drwxr-xr-x 3 root root 4096 Aug 24 04:20 ..
-rw-r--r-- 1 root root 258 Aug 22 13:26 .editorconfig
-rw-r--r-- 1 root root 1202 Aug 24 04:17 .env
-rw-r--r-- 1 root root 1075 Aug 24 04:17 .env.example
-rw-r--r-- 1 root root 179 Aug 22 13:26 .gitattributes
-rw-r--r-- 1 root root 203 Aug 22 13:26 .gitignore
-rw-r--r-- 1 root root 3977 Aug 22 13:26 README.md
drwxr-xr-x 7 root root 4096 Aug 22 13:26 app
-rwxr-xr-x 1 root root 1686 Aug 22 13:26 artisan
drwxr-xr-x 3 root root 4096 Aug 22 13:26 bootstrap
-rw-r--r-- 1 root root 1814 Aug 22 13:26 composer.json
-rw-r--r-- 1 root root 281237 Aug 24 04:17 composer.lock
drwxr-xr-x 2 root root 4096 Aug 22 13:26 config
drwxr-xr-x 5 root root 4096 Aug 22 13:26 database
-rw-r--r-- 1 root root 2894 Aug 24 04:17 docker-compose.yml
drwxr-xr-x 3 root root 4096 Aug 22 13:26 lang
-rw-r--r-- 1 root root 285 Aug 22 13:26 package.json
-rw-r--r-- 1 root root 1105 Aug 24 04:17 phpunit.xml
drwxr-xr-x 2 root root 4096 Aug 22 13:26 public
drwxr-xr-x 5 root root 4096 Aug 22 13:26 resources
drwxr-xr-x 2 root root 4096 Aug 22 13:26 routes
drwxr-xr-x 5 root root 4096 Aug 22 13:26 storage
drwxr-xr-x 4 root root 4096 Aug 22 13:26 tests
drwxr-xr-x 40 root root 4096 Aug 24 04:17 vendor
-rw-r--r-- 1 root root 263 Aug 22 13:26 vite.config.js
Some people suggested fixing this using chown:
$ sail root-shell
$ chown -R sail .
But this approach prevents me from doing write/delete/create any file from local (not from docker)
I've tried to rebuild the container:
$ sail build --no-cache
But no luck.
Additional information:
php -v
PHP 8.1.9 (cli) (built: Aug 15 2022 09:40:11) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.9, Copyright (c) Zend Technologies
with Zend OPcache v8.1.9, Copyright (c), by Zend Technologies
with Xdebug v3.1.5, Copyright (c) 2002-2022, by Derick Rethans
Docker version 20.10.17, build 100c701
OS information
neofetch
.-/+oossssoo+/-. tonysong#tonysong-desktop
`:+ssssssssssssssssss+:` -------------------------
-+ssssssssssssssssssyyssss+- OS: Ubuntu 22.04.1 LTS x86_64
.ossssssssssssssssssdMMMNysssso. Kernel: 5.15.0-46-generic
/ssssssssssshdmmNNmmyNMMMMhssssss/ Uptime: 1 day, 2 mins
+ssssssssshmydMMMMMMMNddddyssssssss+ Packages: 1861 (dpkg), 15 (snap)
/sssssssshNMMMyhhyyyyhmNMMMNhssssssss/ Shell: bash 5.1.16
.ssssssssdMMMNhsssssssssshNMMMdssssssss. Resolution: 2560x1440
+sssshhhyNMMNyssssssssssssyNMMMysssssss+ DE: GNOME 42.2
ossyNMMMNyMMhsssssssssssssshmmmhssssssso WM: Mutter
ossyNMMMNyMMhsssssssssssssshmmmhssssssso WM Theme: Adwaita
+sssshhhyNMMNyssssssssssssyNMMMysssssss+ Theme: Yaru-sage-dark [GTK2/3]
.ssssssssdMMMNhsssssssssshNMMMdssssssss. Icons: Yaru-sage [GTK2/3]
/sssssssshNMMMyhhyyyyhdNMMMNhssssssss/ Terminal: gnome-terminal
+sssssssssdmydMMMMMMMMddddyssssssss+ CPU: AMD Ryzen 5 3600 (12) # 3.600GHz
/ssssssssssshdmNNNNmyNMMMMhssssss/ GPU: NVIDIA GeForce RTX 3070
.ossssssssssssssssssdMMMNysssso. Memory: 12464MiB / 15919MiB
-+sssssssssssssssssyyyssss+-
`:+ssssssssssssssssss+:`
.-/+oossssoo+/-.
Could anyone please help with this? thank you.

I can confirm that using Docker Desktop is the cause.
Solution:
Uninstall Docker Desktop, and use only Docker Engine.

Related

Cant access images and files in laravel public directory - 403 Forbidden - digitalocean

I deployed my laravel project on digital ocean LEMP .
What is the problem I have?
The problem I have is that images, css and js files are not loaded from public folder. It seems like I have a problem with permissions.
I have these folders in Public folder:
img,
photos,
css,
js,
After inspect i find this error :
Status Code: 403 Forbidden
This is the root folder permission:
drwxrwxr-x 13 www-data www-data 4096 Nov 9 16:36 laravelproject
Project folders permissions:
-rw-rw-r-- 1 www-data www-data 3851 Nov 9 16:29 README.md
drwxrwxr-x 10 www-data www-data 4096 Nov 9 16:29 app
-rwxrwxr-x 1 www-data www-data 1686 Nov 9 16:29 artisan
drwxrwxr-x 3 www-data www-data 4096 Nov 9 16:29 bootstrap
-rw-rw-r-- 1 www-data www-data 2116 Nov 9 16:29 composer.json
-rw-rw-r-- 1 www-data www-data 344507 Nov 9 16:29 composer.lock
drwxrwxr-x 2 www-data www-data 4096 Nov 9 16:29 config
drwxrwxr-x 5 www-data www-data 4096 Nov 9 16:29 database
-rw-rw-r-- 1 www-data www-data 743285 Nov 9 16:29 package-lock.json
-rw-rw-r-- 1 www-data www-data 768 Nov 9 16:29 package.json
-rw-rw-r-- 1 www-data www-data 1202 Nov 9 16:29 phpunit.xml
drwxr-xr-x 10 www-data www-data 4096 Nov 9 16:29 public
drwxrwxr-x 9 www-data www-data 4096 Nov 9 16:29 resources
drwxrwxr-x 2 www-data www-data 4096 Nov 9 16:29 routes
-rw-rw-r-- 1 www-data www-data 563 Nov 9 16:29 server.php
drwxrwxr-x 5 www-data www-data 4096 Nov 9 16:29 storage
drwxrwxr-x 4 www-data www-data 4096 Nov 9 16:29 tests
drwxrwxr-x 60 www-data www-data 4096 Nov 9 16:31 vendor
-rw-rw-r-- 1 www-data www-data 679 Nov 9 16:29 webpack.mix.js
Public folder Content Permissions:
drwxr-xr-x 5 www-data www-data 4096 Nov 9 16:29 assets
drwxr-xr-x 4 www-data www-data 4096 Nov 9 16:29 backend
drwxr-xr-x 4 www-data www-data 4096 Nov 9 16:29 css
-rwxr-xr-x 1 www-data www-data 0 Nov 9 16:29 favicon.ico
drwxr-xr-x 3 www-data www-data 4096 Nov 9 16:29 fonts
drwsr-sr-x 5 www-data www-data 4096 Nov 9 16:29 img
-rwxr-xr-x 1 www-data www-data 1735 Nov 9 16:29 index.php
drwxr-xr-x 2 www-data www-data 4096 Nov 9 16:29 js
drwxr-xr-x 2 www-data www-data 4096 Nov 9 16:29 langs
-rwxr-xr-x 1 www-data www-data 173 Nov 9 16:29 mix-manifest.json
-rwxr-xr-x 1 www-data www-data 24 Nov 9 16:29 robots.txt
drwxr-xr-x 3 www-data www-data 4096 Nov 9 16:29 vendor
-rwxr-xr-x 1 www-data www-data 1183 Nov 9 16:29 web.config
Nginx log
2021/11/09 19:00:57 [error] 48608#48608: *92 access forbidden by rule
In case someone faced an issue like this.
If you're running Linux, most likely it's a read/write permission problem, to solve these problems, do the following:
Before doing the steps below, be sure to be outside of your Laravel folder
Assuming that your user should be the owner, type the following command:
sudo chown -R user:www-data /path/of/your/laravel/project
Then give the user and webserver permissions as follows:
sudo find /var/www/project -type f -exec chmod 664 {} ;
then run:
sudo find /var/www/project -type d -exec chmod 775 {} ;
After you run those commands, go to your Laravel folder and give the webserver rights to read/write to your bootstrap/cache and storage folder:
sudo chgrp -R www-data storage bootstrap/cache
sudo chmod -R ug+rwx storage bootstrap/cache
It should solve not only your problem but also solves your project security.

I got Permission denied error while running composer on ubuntu 16

I installed ubuntu 16 under AWS and try to install laravel 5.8 app, but
opening server with
ssh -i /home/user/pemkeys.pem
command
I got Permission denied error while running composer
ubuntu#ip-172-31-34-88:/var/www/html/lprods$ clear
ubuntu#ip-172-31-34-88:/var/www/html/lprods$ sudo chmod -R 775 /var/www/html/lprods/
ubuntu#ip-172-31-34-88:/var/www/html/lprods$ composer install
Cannot create cache directory /home/ubuntu/.composer/cache/repo/https---packagist.org/, or directory is not writable. Proceeding without cache
Cannot create cache directory /home/ubuntu/.composer/cache/files/, or directory is not writable. Proceeding without cache
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Nothing to install or update
[ErrorException]
file_put_contents(/var/www/html/lprods/vendor/composer/installed.json): failed to open stream: Permission denied
install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-plugins] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--ignore-platform-reqs] [--] [<packages>]...
ubuntu#ip-172-31-34-88:/var/www/html/lprods$ whoami
ubuntu
ubuntu#ip-172-31-34-88:/var/www/html/lprods$ lsb_release -d; uname -r; uname -i
Description: Ubuntu 16.04.6 LTS
4.4.0-1084-aws
x86_64
As far as I remember that is not good idea to run
composer install
under root.
Which steps have I to to take to install my app properly ?
UPDATED :
1) My project dir :
$ cd /var/www/html/lprods
$ ls -ld
drwxrwxrwx 16 root root 4096 Jun 17 12:34 .
(what these output means ?)
$ ls -la
total 600
drwxrwxrwx 16 root root 4096 Jun 17 12:34 .
drwxr-xr-x 4 root root 4096 Jun 17 11:42 ..
-rwxrwxrwx 1 root root 625 Jun 17 12:03 .env
-rwxrwxrwx 1 root root 521 Jun 17 11:42 .env.example
drwxrwxrwx 8 root root 4096 Jun 17 11:42 .git
-rwxrwxrwx 1 root root 111 Jun 17 11:42 .gitattributes
-rwxrwxrwx 1 root root 135 Jun 17 11:42 .gitignore
-rwxrwxrwx 1 root root 122 Jun 17 11:42 .htaccess
drwxrwxrwx 3 root root 4096 Jun 17 11:42 Modules
-rwxrwxrwx 1 root root 1110 Jun 17 11:42 Release.key
drwxrwxrwx 2 root root 4096 Jun 17 11:42 __SQL
drwxrwxrwx 10 root root 4096 Jun 17 11:42 app
-rwxrwxrwx 1 root root 1646 Jun 17 11:42 artisan
drwxrwxrwx 3 root root 4096 Jun 17 11:42 bootstrap
-rwxrwxrwx 1 root root 430 Jun 17 11:42 code.html
-rwxrwxrwx 1 root root 186 Jun 17 11:42 code.php
-rwxrwxrwx 1 root root 5746 Jun 17 11:42 code.txt
-rwxrwxrwx 1 root root 8244 Jun 17 11:42 commands.txt
-rwxrwxrwx 1 root root 1953 Jun 17 11:42 composer.json
-rwxrwxrwx 1 root root 187263 Jun 17 11:42 composer.lock
drwxrwxrwx 2 root root 4096 Jun 17 11:42 config
drwxrwxrwx 5 root root 4096 Jun 17 11:42 database
-rwxrwxrwx 1 root root 2860 Jun 17 11:42 env.txt
-rwxrwxrwx 1 root root 4236 Jun 17 11:42 good.html
-rwxrwxrwx 1 root root 83 Jun 17 11:42 lprods.sublime-project
-rwxrwxrwx 1 root root 8460 Jun 17 11:42 lprods.sublime-workspace
-rwxrwxrwx 1 root root 388 Jun 17 11:42 md.txt
drwxrwxrwx 834 root root 36864 Jun 17 11:42 node_modules
-rwxrwxrwx 1 root root 1114 Jun 17 11:42 package.json
-rwxrwxrwx 1 root root 1055 Jun 17 11:42 phpunit.xml
drwxrwxrwx 11 root root 4096 Jun 17 11:42 public
-rwxrwxrwx 1 root root 1465 Jun 17 11:42 q.twig
drwxrwxrwx 5 root root 4096 Jun 17 11:42 resources
drwxrwxrwx 2 root root 4096 Jun 17 11:42 routes
-rwxrwxrwx 1 root root 563 Jun 17 11:42 server.php
drwxrwxrwx 6 root root 4096 Jun 17 11:42 storage
drwxrwxrwx 4 root root 4096 Jun 17 11:42 tests
drwxrwxrwx 46 root root 4096 Jun 17 11:58 vendor
-rwxrwxrwx 1 root root 1549 Jun 17 11:42 webpack.mix.js
-rwxrwxrwx 1 root root 204808 Jun 17 11:42 yarn.lock
2) I removed dirs :
rm -R vendor
rm -R /home/ubuntu/.composer
and after that running in my app
composer install
my project was successfully installed.
Could you please give some explanations, why so ?
Thanks!
you can use sudo composer update if permission denied arises. or you should add composer globally like composer global require laravel/installer and can easily access composer from any where also try changing the permission of the project like sudo chown -R user:user project

Apache will not deliver resources in sub directories of /var/www/html

I currently have a server running Ubuntu 18.04 with Apache2. I am not able to access png's and svg files in sub directories. Example: /var/www/html/icons/new.svg when the page is located in /var/www/html/index.php. However, Apache will deliver images from within the page directory so all photos within /var/www/html will be delivered.
The error code for the images is just a plain 404. I am able to access pages within /var/www/html/sub/index.php. All images are using relative links if that matters.
I do have a non verified ssl on my server but even on plain http it doesn't deliver if that matters.
It's probably a dumb question but thanks for your time anyways.
All Code worked on a local wamp server before being put on a lamp server.
Example Code:
<img src="icons/new.svg"> <!--Wont work-->
<img src="logo.svg"> <!--Will Work-->
Inside /var/www/html
drwxr-xr-x 6 root root 4096 Jun 26 18:04 .
drwxr-xr-x 3 root root 4096 Jun 22 18:55 ..
drwxr-xr-x 4 root root 4096 Jun 26 17:50 icons
-rw-r--r-- 1 root root 4340 Jun 26 18:11 index.php
-rw-r--r-- 1 root root 4172 Jun 26 18:11 logo.svg
-rw-r--r-- 1 root root 1856 Jun 26 18:11 mainstyle.css
drwxr-xr-x 2 root root 4096 Jun 26 17:50 PHP
drwxr-xr-x 2 root root 4096 Jun 26 17:50 plandetails
drwxr-xr-x 2 root root 4096 Jun 26 17:50 planicons
-rw-r--r-- 1 root root 295915 Jun 26 18:11 searchbkg.jpg
-rw-r--r-- 1 root root 7366 Jun 26 18:11 searchbkg.svg
Inside the icons folder
drwxr-xr-x 4 root root 4096 Jun 26 17:50 .
drwxr-xr-x 6 root root 4096 Jun 26 18:04 ..
-rw-r--r-- 1 root root 446 Jun 26 18:37 arrowleft.svg
-rw-r--r-- 1 root root 446 Jun 26 18:37 arrowrt.svg
-rw-r--r-- 1 root root 7863 Jun 26 18:37 bestoffer.svg
-rw-r--r-- 1 root root 4024 Jun 26 18:37 free.svg
-rw-r--r-- 1 root root 477 Jun 26 18:37 informationbubble.svg
-rw-r--r-- 1 root root 3404 Jun 26 18:37 new.svg
drwxr-xr-x 2 root root 4096 Jun 26 17:50 plans
drwxr-xr-x 2 root root 4096 Jun 26 17:50 prices
-rw-r--r-- 1 root root 2272 Jun 26 18:37 save.svg
Updated /var/www/html perms
drwxr-xr-x 6 root root 4096 Jun 26 18:04 .
drwxr-xr-x 3 root root 4096 Jun 22 18:55 ..
drwxr-xr-x 4 root root 4096 Jun 26 17:50 icons
-rw-r--r-- 1 root root 4340 Jun 26 18:37 index.php
-rw-r--r-- 1 root root 4172 Jun 26 18:37 logo.svg
-rw-r--r-- 1 root root 1856 Jun 26 18:37 mainstyle.css
drwxr-xr-x 2 root root 4096 Jun 26 17:50 PHP
drwxr-xr-x 2 root root 4096 Jun 26 17:50 plandetails
drwxr-xr-x 2 root root 4096 Jun 26 17:50 planicons
-rw-r--r-- 1 root root 295915 Jun 26 18:37 searchbkg.jpg
-rw-r--r-- 1 root root 7366 Jun 26 18:37 searchbkg.svg
For anyone wondering I used the combination of the help below and this
This is not a php question, this is an apache question and is a matter of permissions, try:
chmod a+rx /var/www/html/sub/
and
chmod a+r /var/www/html/*
EDIT:
Your Virtual Host should be:
DocumentRoot /var/www/html
<Directory /var/www/html>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require all granted
</Directory>

Location of virtual machines in mac for virtual box

What is the location of all .vbox files that are created in virtual box in a mac. And how can we delete it?
I mistakenly deleted virtualbox.app file from Applications and now I want to delete all the remains of all virtual box files.
I tried following things:
drwxr-xr-x# 3 user admin 102 Dec 19 19:57 vagrant
-rw-r--r-- 1 root wheel 1824496 Feb 21 17:17 com.vagrant.vagrant.bom
-rw-r--r-- 1 root wheel 240 Feb 21 17:17 com.vagrant.vagrant.plist
drwx------ 5 root wheel 170 Feb 21 16:59 ubuntu-cloudimg-precise-vagrant-amd64_1487725164672_27815
./private/var/root/VirtualBox VMs/ubuntu-cloudimg-precise-vagrant-amd64_1487725164672_27815:
-rw------- 1 root wheel 3036 Feb 21 16:59 ubuntu-cloudimg-precise-vagrant-amd64_1487725164672_27815.vbox
-rw------- 1 root wheel 3036 Feb 21 16:59 ubuntu-cloudimg-precise-vagrant-amd64_1487725164672_27815.vbox-prev
lrwxr-xr-x 1 root wheel 24 Feb 21 17:17 vagrant -> /opt/vagrant/bin/vagrant
But I could not find the location of .vbox files to manually delete them.
By default the .vbox files normally go into your users' home directory:
pwd
/Users/Astro58/VirtualBox VMs
total 264
drwx------# 6 lance staff 204 Feb 22 19:03 ./
drwxr-xr-x+ 88 lance staff 2992 Feb 22 16:11 ../
drwx------ 6 lance staff 204 Feb 22 19:50 Laravel_default_1487808229046_76286/
drwx------ 7 lance staff 238 Feb 20 12:53 legacy_default_1487457532080_39585/
You should be able to delete the "VirtualBox VMs" directory via the rm command or via the Mac Finder.

Difference access between the server and my computer mac

I retrieve a project in symfony 1.4 . The project is currently running on an Ubuntu server (LAMP). When I run the project on my Mac , the photos do not appear yet the path is good . I think it is a problem of access rule but i am not an expert.
I Thank You in advance to help me.
As attachment files of my mac and the server.
On my mac :
-rwxrwxrwx 1 vincentmoulene _www 204 17 fév 22:43 README.md
drwxrwxrwx 17 vincentmoulene _www 578 14 jan 22:51 apps
drwxrwxrwx 5 vincentmoulene _www 170 4 mar 22:26 cache
drwxrwxrwx 8 vincentmoulene _www 272 26 fév 11:17 config
-rw-r--r-- 1 vincentmoulene _www 4478 3 mar 17:08 connection_sequel.spf
drwxrwxrwx 5 vincentmoulene _www 170 4 mar 22:26 data
-rwxrwxrwx 1 vincentmoulene _www 3263056 6 fév 12:20 emoovio_2015-02-06.sql
-rwxrwxrwx 1 vincentmoulene _www 3325677 16 fév 18:08 emoovio_2015-02-16.sql
-rwxrwxrwx 1 vincentmoulene _www 11510 14 jan 20:44 index.html
drwxrwxrwx 8 vincentmoulene _www 272 6 fév 16:58 lib
drwxrwxrwx 57 vincentmoulene _www 1938 26 fév 16:02 log
-rw-r--r-- 1 vincentmoulene _www 1364 2 mar 12:19 main.cf
drwxrwxrwx 4 vincentmoulene _www 136 14 jan 21:15 nbproject
drwxrwxrwx 4 vincentmoulene _www 136 14 jan 22:49 plugins
drwxrwxrwx 6 vincentmoulene _www 204 6 fév 16:58 sfFormExtraPlugin
-rwxrwxrwx 1 vincentmoulene _www 446 14 jan 20:44 symfony
drwxrwxrwx 6 vincentmoulene _www 204 6 fév 16:58 test
drwxrwxrwx 17 vincentmoulene _www 578 2 mar 15:29 web
On the server :
drwxrwxrwx 12 777 root 4096 Feb 26 10:08 ./
drwxr-xr-x 3 root root 4096 Dec 17 13:17 ../
drwxrwxrwx 14 www-data www-data 4096 Feb 3 2014 apps/
drwxrwxrwx 4 777 www-data 4096 Feb 25 14:55 cache/
drwxrwxrwx 3 www-data www-data 4096 Dec 29 10:35 config/
drwxrwxrwx 4 www-data www-data 4096 Dec 29 10:35 data/
-rwxrwxrwx 1 root root 11510 Dec 17 13:17 index.html*
drwxrwxrwx 7 www-data www-data 4096 Feb 3 2014 lib/
drwxrwxrwx 3 www-data www-data 4096 Feb 25 15:19 log/
drwxrwxrwx 2 www-data www-data 4096 Feb 2 2014 nbproject/
drwxrwxrwx 3 www-data www-data 4096 Feb 3 2014 plugins/
-rwxrwxrwx 1 www-data www-data 446 Feb 20 2013 symfony*
drwxrwxrwx 5 www-data www-data 4096 Feb 3 2014 test/
drwxrwxrwx 8 www-data www-data 4096 Aug 28 2014 web/
First, I got a functional site to improve it. This site is currently in production and runs on a LAMP stack (Ubuntu 14.04 , ....) .
To work on it , I recover the project . I work on Mac ( MAMP ) .
Indeed, the concern I have is that some pages are not available ... Therefore, I tried to change the rights but to no avail .
Then I tried to run two possibilities:
1) using Apache / Mysql run as www (Apache) and mysql ( mysql) : You do not -have permission to access this server /.../on (error 403).
2) using Apache / Mysql run as user (Apache) and user ( mysql) : The requested URL was not found /.../ on this server (error 404).
And in my apache_error.log : Directory index forbidden by Options directive:

Resources