[nov@ctl cacti]$ scp db01:/tmp/slow_queries_3306.log.1128_0000 ./
scp: /tmp/slow_queries_3306.log.1128_0000: Permission denied
[nov@ctl cacti]$
[nov@ctl cacti]$
[nov@ctl cacti]$ scp db01:/tmp/slow_queries_3306.log.1128_0000 ./
scp: /tmp/slow_queries_3306.log.1128_0000: Permission denied
[nov@ctl cacti]$ ssh db01
-bash-4.1$ cd /tmp
-bash-4.1$ ll
total 12368
-rw-r--r-- 1 mysql mysql 7156 Nov 28 07:37 s_count.log
-rw-r----- 1 mysql mysql 12613764 Nov 28 07:23 slow_queries_3306.log.1128_0000
-rw-r--r-- 1 mysql mysql 0 Nov 28 07:30 s.og
[check]: 这个文件对别的用户没有读取权限,所以需要用chmod赋予新的r权限。
-bash-4.1$ chmod 777 slow_queries_3306.log.1128_0000
-bash-4.1$ chmod 777 s_count.log
-bash-4.1$ exit
logout
[nov@db01 tmp]$ exit
logout
Connection to db01 closed.
[nov@db01 tmp]$ exit
logout
Connection to db01 closed.
[nov@ctl cacti]$ scp db01:/tmp/slow_queries_3306.log.1128_0000 /tmp/
slow_queries_3306.log.1128_0000 100% 12MB 12.0MB/s 00:00
[nov@ctl cacti]$ scp db01:/tmp/s_count.log /tmp/
s_count.log 100% 7156 7.0KB/s 00:00
搞定,OK。
|