rm: cannot remove '/home/forge/site.com/releases/78': Directory not empty #2678
-
Get an error on rollback being told directory is not empty: dep rollback production
➤ Executing task rollback
In Client.php line 103:
The command "cd /home/forge/site.com && (rm -rf /home/forge/site.com/releases/78)" failed.
Exit Code: 1 (General error)
Host Name: production
================
rm: cannot remove '/home/forge/site.com/releases/78': Directory not empty
rollback [-p|--parallel] [-l|--limit LIMIT] [--no-hooks] [--log LOG] [--roles ROLES] [--hosts HOSTS] [-o|--option OPTION] [--] [<stage>] Does the rollback did work. Release 78 is not symlinked to anymore: forge@smt-prod-w-2:~/smart48.com$ ll
total 20
drwxrwxr-x 5 forge forge 4096 Oct 6 06:45 ./
drwxr-xr-x 10 forge forge 4096 Sep 20 09:51 ../
drwxrwxr-x 2 forge forge 4096 Oct 6 06:04 .dep/
lrwxrwxrwx 1 forge forge 11 Oct 6 06:45 current -> releases/77/
drwxrwxr-x 12 forge forge 4096 Oct 6 06:04 releases/
drwxrwxr-x 4 forge forge 4096 Oct 6 06:02 shared/
But really odd so need to get to the bottom of this. How is this possible? I do see that 78 still has content, I think our shared storage directory: forge@smt-prod-w-2:~/domain.com/releases$ cd 78/
forge@smt-prod-w-2:~/domain.com.com/releases/78$ ll
total 12
drwxrwxr-x 3 forge forge 4096 Oct 6 06:45 ./
drwxrwxr-x 12 forge forge 4096 Oct 6 06:04 ../
drwxr-xr-x 4 forge forge 4096 Oct 6 06:45 storage/
forge@smt-prod-w-2:~/domain.com.com/releases/78$ cd storage/
forge@smt-prod-w-2:~/domain.com domain.com com/releases/78/storage$ ll
total 16
drwxr-xr-x 4 forge forge 4096 Oct 6 06:45 ./
drwxrwxr-x 3 forge forge 4096 Oct 6 06:45 ../
drwxr-xr-x 3 forge forge 4096 Oct 6 06:45 framework/
drwxr-xr-x 2 forge forge 4096 Oct 6 06:45 logs/ and permissions seem fine forge@smt-prod-w-2:~/domain.com/releases/78/storage$ stat -c "%a %n" *
755 framework
755 logs
forge@smt-prod-w-2:~/domain.com.com/releases/78/storage$ cd ..
forge@smt-prod-w-2:~/domain.com.com/releases/78$ stat -c "%a %n" *
755 storage and all directories and files are owned by Wonder if it is an issue with the cache files...
These are generated on deployment by Laravel and that was 30 minutes ago here..at the time of the rollback perhaps.. that would be odd also however. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 4 replies
-
On new deployment I was successful again but was told that release 78 was not a local repository and skipped:
Any ideas who to deal with this? |
Beta Was this translation helpful? Give feedback.
-
Actually
|
Beta Was this translation helpful? Give feedback.
-
From https://unix.stackexchange.com/questions/12616/whats-the-reason-that-rm-rf-a-b-says-a-b-is-not-empty
We can try to remove symlinks to shared dir before performing deletion of release. Can you test if it will work? Thanks. PS Also in v7 there is no deletion of broken release at rollback task. |
Beta Was this translation helpful? Give feedback.
-
Well, as stated deployment did work and we are working on moving all in storage to shared. So will close this thread as deployment did work and an improvement is underway. |
Beta Was this translation helpful? Give feedback.
Well, as stated deployment did work and we are working on moving all in storage to shared. So will close this thread as deployment did work and an improvement is underway.