php chown exec() 问题!

发布于 2024-09-14 05:26:38 字数 260 浏览 3 评论 0原文

我需要编写一个执行程序来更改网络服务器上某些文件夹的所有者。这就是我正在做的工作。

exec('cd /xxxxx/xxxxxx/public_html/ && chown user.user * -R', $out);

说实话,阿帕奇不是我的包,所以在黑暗中跌跌撞撞。基本上,我需要将所有目录更改为用户,而不是当前创建时设置的 99。 php chown() 函数已被禁用,所以我必须使用旧方法。

史蒂夫

I need to write an exec to change owner on some folders on my webserver. This is what I am working with.

exec('cd /xxxxx/xxxxxx/public_html/ && chown user.user * -R', $out);

Got to be honest Apache is not my bag so kind of stumbling in the dark. Basically I need to change all directories to user and not 99 as they currently are set to when they are created. The php chown() function has been disabled so Ive got to go old school.

Steve

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

柳絮泡泡 2024-09-21 05:26:38

你不能这样做,因为 chown (通常)需要 root。

You can't do it, as chown (usually) requires root.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文