Wordpress-如何更改所有文件和文件夹的所有者ID和组ID(Nginx,Ubuntu)

时间:2018-06-19 16:17:47

标签: wordpress nginx id

我将我的网站上传到Vultr。 (Wordpress,Nginx,Ubuntu)

我在Windows上通过Bitvise访问文件。

我修复了几乎所有的错误。

但是var / www / html /中的所有文件和文件夹都没有所有者ID和组ID。

所有主题均具有755和644权限。但是我仍然无法安装插件或更新插件。

如果我将所有者ID更改为113,将组ID更改为117 =>一切正常。 但是有很多文件和文件夹。我无法用手更改每个文件。

无论如何,可以在命令行/终端Windows中将所有主题更改为113和117。

查看此图像:https://upanhtocdo.com/image/HGhDZ

非常感谢! 我英文不太好。请原谅我!

1 个答案:

答案 0 :(得分:0)

我不知道您使用的是哪个版本的Bitvise,但根据他们的documenation,您可以使用chown命令:

sftp> help chown
USAGE: chown owner-id[:group-id] remote-path [-s] [-wild|-lit]
DESCRIPTION:
   Change the owner (and group, if preset) of file 'remote-path'
   to 'owner-id' (and 'group-id').
PARAMETERS:
 -s    Include subdirectories (recursive).
 -wild Treat remote-path as a wildcard pattern.
 -lit  Treat remote-path literally (not a wildcard pattern).

NOTES:
 - The syntax of this command is different when SFTP version 4 or
   higher is in use.

在您的情况下,将是:

chown 113:117 /var/www/html -s