laravel -- php -- more basic questions.. pt. #2
bruce <[email protected]>
| Newsgroups | gmane.comp.php.general |
|---|---|
| Message-ID | <CAP16ngp6wkuzG4kphQ0Te5NNNshBw82w=DafAVLomhOeUXxpJA@mail.gmail.com> |
nov5 -1
laravel -- php -- more basic questions.. pt. #2
Hi
As some of the list may know I'm trying to test a github repos
("https://github.com/thedevdojo/wave").
The goal is to have a digitalocean/instance, running Ubuntu/Apache2,
to display the same basic app as in the "https://wave.devdojo.com/"
demo site.
The app requires php/laravel/composer/mysql/apache2 to run.
I have Laravel -- "composer update" issues in terms or user
owner/group Owner - permissions settings. Not exactly sure what the
settings should be for a given dir/file.
Doing a trial/error process with checking out different sites.
I set permissions to top level of dirs to 755
/var/www/html/wave
/var/www/html/wave/wave
set 755 -R
/var/www/html/wave/wave/storage
/var/www/html/wave/wave/bootstrap
user:group -R www-data, www-data
/var/www/html/wave
inside func link tt /var/www/html/wave/wave/storage/app/public
set 755 -R --test..??
/var/www/html/wave/wave/public/storage
chmod -R 755 /var/www/html/wave/wave/public/storage
I have the users:
root
testuser
the "testuser" is the user used to run the laravel "composer update" cmds...
I'm presently getting an error:
from "composer update"
> @php artisan storage:link
ErrorException
symlink(): Permission denied
at vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php:340
336▕ */
337▕ public function link($target, $link)
338▕ {
339▕ if (! windows_os()) {
➜ 340▕ return symlink($target, $link);
341▕ }
342▕
343▕ $mode = $this->isDirectory($target) ? 'J' : 'H';
344▕
+15 vendor frames
16 artisan:35
Illuminate\Foundation\Console\Kernel::handle()
Script @php artisan storage:link handling the post-autoload-dump event
returned with error code 1
the dir the cmd is being run from
"/var/www/html/wave/wave"
the dir tree is:
testuser@ubuntu-s-1vcpu-2gb-nyc1-01:/var/www/html/wave/wave$ ls -al
total 496
drwxrwxrwx 17 www-data www-data 4096 Nov 4 03:22 .
drwxrwxrwx 9 www-data www-data 4096 Nov 4 03:16 ..
drw-r-xr-x 2 www-data www-data 4096 Oct 31 17:17 .do
-rw-r-xr-x 1 www-data www-data 1650 Oct 31 17:17 .dockerignore
-rw-r-xr-x 1 www-data www-data 258 Oct 31 17:17 .editorconfig
-rw-r-xr-x 1 www-data www-data 1085 Oct 31 17:17 .env.example
drw-r-xr-x 8 www-data www-data 4096 Oct 31 17:17 .git
-rw-r-xr-x 1 www-data www-data 152 Oct 31 17:17 .gitattributes
drw-r-xr-x 3 www-data www-data 4096 Oct 31 17:17 .github
-rw-r-xr-x 1 www-data www-data 337 Oct 31 17:17 .gitignore
-rw-r-xr-x 1 www-data www-data 705 Oct 31 17:17 Dockerfile
-rw-r-xr-x 1 www-data www-data 1069 Oct 31 17:17 LICENSE.md
-rw-r-xr-x 1 www-data www-data 4822 Oct 31 17:17 README.md
-rw-r-xr-x 1 www-data www-data 294 Oct 31 17:17 SECURITY.md
drw-r-xr-x 7 www-data www-data 4096 Oct 31 17:17 app
-rw-r-xr-x 1 www-data www-data 1686 Oct 31 17:17 artisan
drwxrwxrwx 3 www-data www-data 4096 Oct 31 17:17 bootstrap
-rw-r-xr-x 1 www-data www-data 302 Oct 31 17:17 buildDocker.sh
-rw-r-xr-x 1 www-data www-data 2317 Oct 31 17:17 composer.json
-rwxrwxrwx 1 www-data www-data 348410 Nov 4 03:22 composer.lock
drw-r-xr-x 2 www-data www-data 4096 Oct 31 17:17 config
drw-r-xr-x 4 www-data www-data 4096 Oct 31 17:17 database
-rw-r-xr-x 1 www-data www-data 9865 Oct 31 17:17 deploy.json
-rw-r-xr-x 1 www-data www-data 1675 Oct 31 17:17 docker-compose.yml
drw-r-xr-x 17 www-data www-data 4096 Oct 31 17:17 lang
-rw-r-xr-x 1 www-data www-data 152 Oct 31 17:17 package-lock.json
-rw-r-xr-x 1 www-data www-data 42 Oct 31 17:17 package.json
-rw-r-xr-x 1 www-data www-data 1160 Oct 31 17:17 phpunit.xml
drw-r-xr-x 5 www-data www-data 4096 Oct 31 17:17 public
drw-r-xr-x 3 www-data www-data 4096 Oct 31 17:17 resources
drw-r-xr-x 2 www-data www-data 4096 Oct 31 17:17 routes
drwxrwxrwx 6 www-data www-data 4096 Oct 31 17:17 storage
drw-r-xr-x 7 www-data www-data 4096 Oct 31 17:17 tests
drwxrwxr-x 50 testuser testuser 4096 Nov 4 03:22 vendor
drw-r-xr-x 7 www-data www-data 4096 Oct 31 17:17 wave
-rw-r-xr-x 1 www-data www-data 1159 Nov 2 23:12 wave.env
in checking out the Filesystem.php
337▕ public function link($target, $link)
338▕ {
339▕ if (! windows_os()) {
➜ 340▕ return symlink($target, $link);
341▕ }
342▕
did a quick test of the Filesystem.php to see exactly what
"target/link" dirs are, to try to
better understand what might be the issues..
inside func link tt-- /var/www/html/wave/wave/wave/docs
ll target -- /var/www/html/wave/wave/public/wave/docs
so the "target" is basically the -->"/var/www/html/wave/wave/public" tree
tested creating a --
root@ubuntu-s-1vcpu-2gb-nyc1-01:/var/www/html/wave/wave# mkdir
/var/www/html/wave/wave/public/storage "added storage.."
root@ubuntu-s-1vcpu-2gb-nyc1-01:/var/www/html/wave/wave# chown
www-data:www-data -R /var/www/html/wave/wave/public/storage
root@ubuntu-s-1vcpu-2gb-nyc1-01:/var/www/html/wave/wave# chmod -R 775
/var/www/html/wave/wave/public/storage
running the "composre update" now gives err
ERROR The [public/storage] link already exists.
inside func link tt /var/www/html/wave/wave/wave/docs
ll /var/www/html/wave/wave/public/wave/docs
ErrorException
symlink(): Permission denied
which says that "creating" a test "public/storage" dir with the chmod
-R 775, chown -R www-data:www-data isn't the solution!
so.. I'm not exactly sure what's the basic issue...
Once I/the test gets through setting up/running the laravel/composer
cmds, I'll do the migrate/db stuff.. and hopefully up will pop a test
page!
I'm at a complete/current loss as to what's causing the expected
user/permission errors....
If anyone has any thoughts/pointers, I'm more than willing to try them.
If someone is really bored and wants to ump on the cloud/instance, I
can easily give you access!
Given this is a cheap instance, it can be blown away/reinstalled in a
few minutes!
thanks
-bruce