# 从二进制安装不支持root运行的问题

**URL:** <https://forum.gitea.com/t/root/5583>\
**Category:** 中文求助(Chinese Only)\
**Created:** [July 27, 2022, 4:35am UTC](https://forum.gitea.com/t/root/5583 "2022-07-27T04:35:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![281978297](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/281978297/32/2848_2.png) [@281978297](https://forum.gitea.com/u/281978297)\
**Post date:** [July 27, 2022, 4:35am UTC](https://forum.gitea.com/t/root/5583/1 "2022-07-27T04:35:33Z")

</div>

centos 7.9 环境下从二进制安装，gitea无法正常使用root启动

```auto
# ./gitea web
2022/07/27 12:28:33 cmd/web.go:102:runWeb() [I] Starting Gitea on PID: 42618
2022/07/27 12:28:33 ...s/setting/setting.go:965:loadFromConf() [F] Gitea is not supposed to be run as root. Sorry. If you need to use privileged TCP ports please instead use setcap and the `cap_net_bind_service` permission

```

---

<div class="post-metadata">

**Author:** ![hjl4am](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/hjl4am/32/1479_2.png) [@hjl4am](https://forum.gitea.com/u/hjl4am)\
**Post date:** [August 1, 2022, 12:43pm UTC](https://forum.gitea.com/t/root/5583/2 "2022-08-01T12:43:45Z")

</div>

```auto
//不能用root账号直接运行gitea，新建git账号
groupadd git
useradd git -g git
chmod +x gitea
cd ../
chown -R git:git ./gitea
su git
./gitea web

```
