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

时间:2015-05-20 16:25:37

标签: wordpress bash unix 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-)

有人可以就我应该做什么给我一些建议吗?问题可能与一切似乎都归“无人”所有这一事实有关吗?

1 个答案:

答案 0 :(得分:1)

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

PS:chmod 777永远不是一个好主意。您可能想要检查组65534是什么,然后将自己添加到该组中。