The deployment of capistrano fails with an error, unable to create / u / apps / ...

After I had no problems deploying with multiple environments, this error suddenly occurred:

** [server.com :: out] fatal: could not create leading directories of '/u/apps/application/shared/cached-copy': Permission denied 

I do not know why this is happening. I am interested in the directory mentioned in the post:

 /u/apps/ 

Ther is not such a directory, and I did not write it in deployment tasks.

+4
source share
2 answers

It seems that some information about the correct deployment path has been lost. Therefore, when running these commands, the problem was fixed:

 cap preview deploy:setup cap production deploy:setup 
+1
source

/u/apps is the default prefix used when :deploy_to not set. Usually only the root user has privileges to create the /u directory, so such errors appear with the default prefix when Capistrano does not start with root privileges.

+3
source

Source: https://habr.com/ru/post/1484094/


All Articles