phpBB 安装:不允许 chgrp

phpBB 安装:不允许 chgrp

我做错了什么?

在安装 phpBB 期间我确实看到过许多此类警告:[phpBB Debug] "chgrp(): Operation not permitted" in file /var/www/phpbb_0003_0003_0011/vendor/symfony/filesystem/Filesystem.php on line 257。 中的所有文件/var/www/phpbb_0003_0003_0011/均归 拥有www-data

Filesystem.php 第 257 行是块if内的子句else

    /**
     * Change the group of an array of files or directories.
     *
     * @param string|iterable $files     A filename, an array of files, or a \Traversable instance to change group
     * @param string|int      $group     A group name or number
     * @param bool            $recursive Whether change the group recursively or not
     *
     * @throws IOException When the change fails
     */
    public function chgrp($files, $group, $recursive = false)
    {
        foreach ($this->toIterable($files) as $file) {
            if ($recursive && is_dir($file) && !is_link($file)) {
                $this->chgrp(new \FilesystemIterator($file), $group, true);
            }
            if (is_link($file) && \function_exists('lchgrp')) {
                if (true !== @lchgrp($file, $group) || (\defined('HHVM_VERSION') && !posix_getgrnam($group))) {
                    throw new IOException(sprintf('Failed to chgrp file "%s".', $file), 0, null, $file);
                }
            } else {
                if (true !== @chgrp($file, $group)) {
                    throw new IOException(sprintf('Failed to chgrp file "%s".', $file), 0, null, $file);
                }
            }
        }
    }

相关内容