deployer
deployer copied to clipboard
deployment path does not have the correct permission
trafficstars
- Deployer version: 7.4.0
- Deployment OS: Ubuntu 24.04 LTS
<?php
namespace Deployer;
require 'recipe/statamic.php';
require 'contrib/npm.php';
// Config
set('repository', '[email protected]:xxx/xxx.git');
set('writable_mode', 'chmod');
set('writable_recursive', true);
set('writable_chmod_mode', '0775');
add('shared_files', []);
add('shared_dirs', []);
add('writable_dirs', ['content','users']);
// Hosts
host('rabol.dev')
->set('remote_user', 'deployer')
->set('deploy_path', '/var/www/xxx');
desc('Installs npm packages');
task('npm:build', function () {
run("cd {{release_path}} && {{bin/npm}} run build");
});
// Hooks
before('deploy:publish','npm:install');
after('npm:install', 'npm:build');
after('deploy:failed', 'deploy:unlock');
when doing the initial deployment, the folder that is specified in deployment_path and the shared and releases folders is not created with the settings in writable_chmod_mode
therefor the web server cannot write to some files e.g.
The FlockStore directory "/var/www/xxx/releases/1/storage/statamic/stache-locks" is not writable.
the deployment_path folder, shared and releases folders are created like this:
drwxr-xr-x 5 deployer www-data 4096 Aug 26 19:02 xxxx
Upvote & Fund
- We're using Polar.sh so you can upvote and help fund this issue.
- We receive the funding once the issue is completed & confirmed by you.
- Thank you in advance for helping prioritize & fund our backlog.