如何使用 putty ftp 将主题目录移动到远程?

How can I move a theme directory to a remote with putty ftp?

我试过这个:

 Directory of C:\Program Files (x86)\PuTTY

05/21/2015  12:00 AM    <DIR>          .
05/21/2015  12:00 AM    <DIR>          ..
05/21/2015  12:00 AM    <DIR>          sahifa
              14 File(s)      3,793,924 bytes
               3 Dir(s)  22,940,766,208 bytes free
psftp> put -r sahifa
/var/www/html/myblog/wp-content/themes/sahifa: create directory: permission deni
ed
psftp>

但是它给了我一个被拒绝的权限。

这是目录。

[ec2-user@ip-172-31-34-160 wp-content]$ ls -al
total 20
drwxr-xr-x 4 nobody 65534 4096 May  7 01:45 .
drwxr-xr-x 5 nobody 65534 4096 May 19 06:47 ..
-rw-r--r-- 1 nobody 65534   28 Jan  8  2012 index.php
drwxr-xr-x 3 nobody 65534 4096 May  7 01:45 plugins
drwxr-xr-x 5 nobody 65534 4096 May  7 01:45 themes

我试过了,但似乎不起作用:

[ec2-user@ip-172-31-34-160 wp-content]$ [ec2-user@ip-172-31-34-160 wp-content]$ chmod 777 themes
[ec2-user@ip-172-31-34-160 wp-content]$ chmod: changing permissions of ‘themes’: Operation not permitted

我也试过这个:

drwxr-xr-x 4 nobody 65534 4096 May  7 01:45 .
drwxr-xr-x 5 nobody 65534 4096 May 19 06:47 ..
-rw-r--r-- 1 nobody 65534   28 Jan  8  2012 index.php
drwxr-xr-x 3 nobody 65534 4096 May  7 01:45 plugins
drwxr-xr-x 5 nobody 65534 4096 May  7 01:45 themes
[ec2-user@ip-172-31-34-160 wp-content]$ chmod -v 746 themes
chmod: changing permissions of ‘themes’: Operation not permitted
failed to change mode of ‘themes’ from 0755 (rwxr-xr-x) to 0746 (rwxr--rw-)

有人可以就我应该做什么给我一些建议吗?这个问题可能与所有东西似乎都属于 "nobody" 的事实有关吗?

您当前的用户 ec2-user 没有移动或创建文件的权限,因为当前目录归 nobody:65534 所有。如果您有 sudo 访问权限,请将 sudo 放在 chmod 命令的开头。

PS:chmod 777 从来都不是一个好主意。您可能想查看什么是组 65534,然后将您自己添加到该组。