> ## Documentation Index
> Fetch the complete documentation index at: https://ayakaleaf-pro.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# 批量转移项目所有权

```bash wrap theme={null}
# email based
toolkit$ bin/run-script modules/server-ce-scripts/scripts/transfer-all-projects-to-user.mjs --from-user=alice@example.com --to-user=bob@example.com

# user-id based
tookit$ bin/run-script modules/server-ce-scripts/scripts/transfer-all-projects-to-user.mjs --from-user=68880f000000000000000000 --to-user=68880f000000000000000001

# Legacy docker-compose.yml setup:
$ docker exec sharelatex /bin/bash -c "source /etc/overleaf/env.sh && source /etc/container_environment.sh && cd /overleaf/services/web && node ./modules/server-ce-scripts/scripts/transfer-all-projects-to-user.mjs --from-user=alice@example.com --to-user=bob@example.com"
```

## 参数

| 名称 | 描述 |
| - | - |
| `--from-user` | 当前项目所有者的邮箱或用户 ID |
| `--to-user` | 新项目所有者的邮箱或用户 ID |

## 完成

如果脚本因错误而提前终止，它会打印错误信息并以退出码 1 退出，表示执行失败。

如果迁移成功完成，它会打印"Done"并以退出码 0 退出。


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.