diff --git a/obs/_generic/build-scripts/10tarball_directory.sh b/obs/_generic/build-scripts/10tarball_directory.sh
index 4055ba31344c8bc8bccfde33499aaa41d6907e34..2a9c0090f655a62ff092b2a41bb423493aed7a94 100755
--- a/obs/_generic/build-scripts/10tarball_directory.sh
+++ b/obs/_generic/build-scripts/10tarball_directory.sh
@@ -48,6 +48,17 @@ cp bin/buildout bin/backup.buildout
 # run $RUN_BUILDOUT_DIR/bin/buildout (note that it modifies itself via rebootstrapping when compiling python)
 ./bin/buildout -v
 
+### Fix the go/ directory.
+
+# For some reason the user does not have the "write" permission on some directories within $RUN_BUILDOUT_DIR/go/. As it is
+# needed on a directory to delete a file in it, the if block adds the permissions to every
+# directories in go/.
+# This is performed before copying the directory tree elsewhere so that every copy is fixed.
+# It also allows the cleaning script to delete the result of the current script.
+if [ -d "$RUN_BUILDOUT_DIR"/go ]; then
+	find "$RUN_BUILDOUT_DIR"/go -type d -exec chmod u+xw {} +
+fi
+
 ### Backup $TARBALL_DIR for debugging or other purpose
 # add "backup." before the directory name pointed to by $TARBALL_DIR
 BACKUP_DIR="$TARBALL_DIR"/../backup."$SOFTWARE_AND_VERSION"