chgrp 至 我不属于的组

chgrp 至 我不属于的组

我正在使用 PHP 应用程序创建 git 存储库、ldap 帐户和 ldap 组。一切正常,但我无法为 git 存储库设置正确的权限。每个 ldap 用户都是某个 ldap 组的成员,因此我想将 git 存储库(常规目录)上的组更改为特定的 ldap 组。问题是,该用户www-data无法将组更改为他不是其成员的任何其他组。如何在 apache/www-data 用户下创建目录后更改组?

www-data@server:/home/git$ mkdir repo.git
www-data@server:/home/git$ chgrp mygroup repo.git
chgrp: changing group of `repo.git/': Operation not permitted

答案1

您需要成为www-data超级用户mygroup或使用超级用户帐户进行更改。无论哪种情况,您都需要 root 访问权限或有 root 访问权限的人来帮助您。

相关内容