Still fiddling with bedrock-capistrano on shared hosting and getting mkdir: cannot create directory /var/www’: Permission denied` error.
Is it on the server that Capistrano is trying to write to /var/www? Because that is owned by Root (of course). Is there a workaround? Am I misunderstanding something?
So yes it would try to create /srv/ww/<app_name> by default on the server. Or maybe /var/www in your case. Obviously whatever directory you set for deploy_to needs to have permissions set up for Capistrano’s user to create/edit files/directories in there.
Great! Getting there. Still getting exit status > 0, though:
DEBUG[00ac408b] stdin: is not a tty
cap aborted!
SSHKit::Runner::ExecuteError: Exception while executing on host account_name: composer exit status: 2
composer stdout: Nothing written ```
If I `cd ` into the latest release directory and run `/home/account_name/bin/composer.phar install --no-dev --prefer-dist --no-interaction --quiet --optimize-autoloader` there's no output whatsoever.
Wait a minute! Let’s try running composer install without all the flags, in particular the --quiet flag.
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Your requirements could not be resolved to an installable set of packages.
Problem 1
- This package requires php >=5.4 but your PHP version (5.3.29) does not satisfy that requirement.
Update php version via CPANEL and we seem to be in business.
Finished in 0.138 seconds with exit status 0 (successful).
I’m trying to use combination of .htaccess and symlinks where .htaccess redirects to web
RewriteEngine on
RewriteRule ^(.*)$ /web/$1
Require all granted
And web is a symlink that points to ..deploy/current/web where ../deploy/current is also a symlink pointing to the latest release in /home/hamiltonwellness/deploy/releases/TIMESTAMP/
The symlinks are all owned by account_name, with permissions of 777 (the default?).