Error[8]: Undefined offset: 5, File: /www/wwwroot/outofmemory.cn/tmp/plugin_ss_superseo_model_superseo.php, Line: 121
File: /www/wwwroot/outofmemory.cn/tmp/plugin_ss_superseo_model_superseo.php, Line: 473, decode(

概述[root@localhost ~]# cat /etc/issueFedora release 17 (Beefy Miracle)Kernel \r on an \m (\l)[root@localhost ~]# uname -aLinux localhost.localdomain 3.6.10-2.fc17.i686 #1 SMP Tue Dec 11 18:33:15 UTC
[root@localhost ~]# cat /etc/issueFedora release 17 (Beefy Miracle)Kernel \r on an \m (\l)[root@localhost ~]# uname -alinux localhost.localdomain 3.6.10-2.fc17.i686 #1 SMP Tue Dec 11 18:33:15 UTC 2012 i686 i686 i386 GNU/linux[root@localhost ~]# tcpdump -i p3p1 -n -w out.pcap -C 16tcpdump: out.pcap: Permission denIEd

为什么我会得到错误?

我该怎么办?

解决方法 我在Centos 5上试过,即使在tmp或root文件夹上也是如此.从tcpdump手册页中,在打开第一个savefile之前,与-Z选项(默认启用)一起使用时,将删除权限.因为您指定了“-C 1”,因为文件大小已经达到1而发生权限被拒绝,并且在创建新文件时它将引发权限被拒绝错误.所以只需指定-Z用户
# strace tcpdump -i eth0 -n -w out.pcap -C 1fstat(4,{st_mode=S_IFREG|0644,st_size=903,...}) = 0mmap(NulL,4096,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANONYMOUS,-1,0) = 0x2aea31934000lseek(4,SEEK_CUR)                   = 0read(4,"root:x:0:root\nbin:x:1:root,bin,d"...,4096) = 903read(4,"",4096)                       = 0close(4)                                = 0munmap(0x2aea31934000,4096)            = 0setgroups(1,[77])                      = 0setgID(77)                              = 0setuID(77)                              = 0setsockopt(3,Sol_SOCKET,SO_ATTACH_FILTER,"
# grep 77 /etc/grouppcap:x:77:# grep 77 /etc/passwdpcap:x:77:77::/var/arpwatch:/sbin/nologin
# man tcpdump       -C     Before writing a raw packet to a savefile,check whether the file is currently larger than file_size and,if so,close the current savefile and open a new one.  Savefiles after the first savefile will have the name  specifIEd              with  the -w flag,with a number after it,starting at 1 and continuing upward.  The units of file_size are mil-              lions of bytes (1,000,000 bytes,not 1,048,576 bytes).              **Note that when used with -Z option (enabled by default),privileges are dropped before opening first savefile.**# tcpdump --helptcpdump version 3.9.4libpcap version 0.9.4Usage: tcpdump [-aAdDeflLnnopqRStuUvxX] [-c count] [ -C file_size ]                [ -E algo:secret ] [ -F file ] [ -i interface ] [ -M secret ]                [ -r file ] [ -s snaplen ] [ -T type ] [ -w file ]                [ -W filecount ] [ -y datalinktype ] [ -Z user ]                [ Expression ]
# tcpdump -i eth0 -n -w out.pcap -C 1 -Z roottcpdump: Listening on eth0,link-type EN10MB (Ethernet),capture size 96 bytes35 packets captured35 packets received by filter0 packets dropped by kernel
[+++][+++][+++][+++]07k[+++][+++][+++][+++][+++]",16) = 0fcntl(3,F_GETFL) = 0x2 (flags O_RDWR)fcntl(3,F_SETFL,O_RDWR|O_NONBLOCK) = 0recvfrom(3,0x7fff9563d35f,1,32,0) = -1 EAGAIN (Resource temporarily unavailable)fcntl(3,O_RDWR) = 0setsockopt(3,"[+++][+++][+++][+++][+++][+++]P73[+++][+++][+++][+++]",16) = 0open("out.pcap",O_WRONLY|O_CREAT|O_Trunc,0666) = -1 EACCES (Permission denIEd)write(2,"tcpdump: ",9tcpdump: ) = 9write(2,"out.pcap: Permission denIEd",27out.pcap: Permission denIEd) = 27write(2,"\n",1) = 1exit_group(1) = ?

你可以看到上面的strace结果,tcpdump将权限放入用户和组pcap(77).

[+++]

从tcpdump手册页,-C

[+++]

使用-Z用户指定特定用户

[+++] 总结

以上是内存溢出为你收集整理的linux – tcpdump:out.pcap:权限被拒绝全部内容,希望文章能够帮你解决linux – tcpdump:out.pcap:权限被拒绝所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

)
File: /www/wwwroot/outofmemory.cn/tmp/route_read.php, Line: 126, InsideLink()
File: /www/wwwroot/outofmemory.cn/tmp/index.inc.php, Line: 166, include(/www/wwwroot/outofmemory.cn/tmp/route_read.php)
File: /www/wwwroot/outofmemory.cn/index.php, Line: 30, include(/www/wwwroot/outofmemory.cn/tmp/index.inc.php)
Error[8]: Undefined offset: 6, File: /www/wwwroot/outofmemory.cn/tmp/plugin_ss_superseo_model_superseo.php, Line: 121
File: /www/wwwroot/outofmemory.cn/tmp/plugin_ss_superseo_model_superseo.php, Line: 473, decode(

概述[root@localhost ~]# cat /etc/issueFedora release 17 (Beefy Miracle)Kernel \r on an \m (\l)[root@localhost ~]# uname -aLinux localhost.localdomain 3.6.10-2.fc17.i686 #1 SMP Tue Dec 11 18:33:15 UTC
[root@localhost ~]# cat /etc/issueFedora release 17 (Beefy Miracle)Kernel \r on an \m (\l)[root@localhost ~]# uname -alinux localhost.localdomain 3.6.10-2.fc17.i686 #1 SMP Tue Dec 11 18:33:15 UTC 2012 i686 i686 i386 GNU/linux[root@localhost ~]# tcpdump -i p3p1 -n -w out.pcap -C 16tcpdump: out.pcap: Permission denIEd

为什么我会得到错误?

我该怎么办?

解决方法 我在Centos 5上试过,即使在tmp或root文件夹上也是如此.从tcpdump手册页中,在打开第一个savefile之前,与-Z选项(默认启用)一起使用时,将删除权限.因为您指定了“-C 1”,因为文件大小已经达到1而发生权限被拒绝,并且在创建新文件时它将引发权限被拒绝错误.所以只需指定-Z用户
# strace tcpdump -i eth0 -n -w out.pcap -C 1fstat(4,{st_mode=S_IFREG|0644,st_size=903,...}) = 0mmap(NulL,4096,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANONYMOUS,-1,0) = 0x2aea31934000lseek(4,SEEK_CUR)                   = 0read(4,"root:x:0:root\nbin:x:1:root,bin,d"...,4096) = 903read(4,"",4096)                       = 0close(4)                                = 0munmap(0x2aea31934000,4096)            = 0setgroups(1,[77])                      = 0setgID(77)                              = 0setuID(77)                              = 0setsockopt(3,Sol_SOCKET,SO_ATTACH_FILTER,"
# grep 77 /etc/grouppcap:x:77:# grep 77 /etc/passwdpcap:x:77:77::/var/arpwatch:/sbin/nologin
# man tcpdump       -C     Before writing a raw packet to a savefile,check whether the file is currently larger than file_size and,if so,close the current savefile and open a new one.  Savefiles after the first savefile will have the name  specifIEd              with  the -w flag,with a number after it,starting at 1 and continuing upward.  The units of file_size are mil-              lions of bytes (1,000,000 bytes,not 1,048,576 bytes).              **Note that when used with -Z option (enabled by default),privileges are dropped before opening first savefile.**# tcpdump --helptcpdump version 3.9.4libpcap version 0.9.4Usage: tcpdump [-aAdDeflLnnopqRStuUvxX] [-c count] [ -C file_size ]                [ -E algo:secret ] [ -F file ] [ -i interface ] [ -M secret ]                [ -r file ] [ -s snaplen ] [ -T type ] [ -w file ]                [ -W filecount ] [ -y datalinktype ] [ -Z user ]                [ Expression ]
# tcpdump -i eth0 -n -w out.pcap -C 1 -Z roottcpdump: Listening on eth0,link-type EN10MB (Ethernet),capture size 96 bytes35 packets captured35 packets received by filter0 packets dropped by kernel
[+++][+++][+++]07k[+++][+++][+++][+++][+++]",16) = 0fcntl(3,F_GETFL) = 0x2 (flags O_RDWR)fcntl(3,F_SETFL,O_RDWR|O_NONBLOCK) = 0recvfrom(3,0x7fff9563d35f,1,32,0) = -1 EAGAIN (Resource temporarily unavailable)fcntl(3,O_RDWR) = 0setsockopt(3,"[+++][+++][+++][+++][+++][+++]P73[+++][+++][+++][+++]",16) = 0open("out.pcap",O_WRONLY|O_CREAT|O_Trunc,0666) = -1 EACCES (Permission denIEd)write(2,"tcpdump: ",9tcpdump: ) = 9write(2,"out.pcap: Permission denIEd",27out.pcap: Permission denIEd) = 27write(2,"\n",1) = 1exit_group(1) = ?

你可以看到上面的strace结果,tcpdump将权限放入用户和组pcap(77).

[+++]

从tcpdump手册页,-C

[+++]

使用-Z用户指定特定用户

[+++] 总结

以上是内存溢出为你收集整理的linux – tcpdump:out.pcap:权限被拒绝全部内容,希望文章能够帮你解决linux – tcpdump:out.pcap:权限被拒绝所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

)
File: /www/wwwroot/outofmemory.cn/tmp/route_read.php, Line: 126, InsideLink()
File: /www/wwwroot/outofmemory.cn/tmp/index.inc.php, Line: 166, include(/www/wwwroot/outofmemory.cn/tmp/route_read.php)
File: /www/wwwroot/outofmemory.cn/index.php, Line: 30, include(/www/wwwroot/outofmemory.cn/tmp/index.inc.php)
Error[8]: Undefined offset: 7, File: /www/wwwroot/outofmemory.cn/tmp/plugin_ss_superseo_model_superseo.php, Line: 121
File: /www/wwwroot/outofmemory.cn/tmp/plugin_ss_superseo_model_superseo.php, Line: 473, decode(

概述[root@localhost ~]# cat /etc/issueFedora release 17 (Beefy Miracle)Kernel \r on an \m (\l)[root@localhost ~]# uname -aLinux localhost.localdomain 3.6.10-2.fc17.i686 #1 SMP Tue Dec 11 18:33:15 UTC
[root@localhost ~]# cat /etc/issueFedora release 17 (Beefy Miracle)Kernel \r on an \m (\l)[root@localhost ~]# uname -alinux localhost.localdomain 3.6.10-2.fc17.i686 #1 SMP Tue Dec 11 18:33:15 UTC 2012 i686 i686 i386 GNU/linux[root@localhost ~]# tcpdump -i p3p1 -n -w out.pcap -C 16tcpdump: out.pcap: Permission denIEd

为什么我会得到错误?

我该怎么办?

解决方法 我在Centos 5上试过,即使在tmp或root文件夹上也是如此.从tcpdump手册页中,在打开第一个savefile之前,与-Z选项(默认启用)一起使用时,将删除权限.因为您指定了“-C 1”,因为文件大小已经达到1而发生权限被拒绝,并且在创建新文件时它将引发权限被拒绝错误.所以只需指定-Z用户
# strace tcpdump -i eth0 -n -w out.pcap -C 1fstat(4,{st_mode=S_IFREG|0644,st_size=903,...}) = 0mmap(NulL,4096,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANONYMOUS,-1,0) = 0x2aea31934000lseek(4,SEEK_CUR)                   = 0read(4,"root:x:0:root\nbin:x:1:root,bin,d"...,4096) = 903read(4,"",4096)                       = 0close(4)                                = 0munmap(0x2aea31934000,4096)            = 0setgroups(1,[77])                      = 0setgID(77)                              = 0setuID(77)                              = 0setsockopt(3,Sol_SOCKET,SO_ATTACH_FILTER,"
# grep 77 /etc/grouppcap:x:77:# grep 77 /etc/passwdpcap:x:77:77::/var/arpwatch:/sbin/nologin
# man tcpdump       -C     Before writing a raw packet to a savefile,check whether the file is currently larger than file_size and,if so,close the current savefile and open a new one.  Savefiles after the first savefile will have the name  specifIEd              with  the -w flag,with a number after it,starting at 1 and continuing upward.  The units of file_size are mil-              lions of bytes (1,000,000 bytes,not 1,048,576 bytes).              **Note that when used with -Z option (enabled by default),privileges are dropped before opening first savefile.**# tcpdump --helptcpdump version 3.9.4libpcap version 0.9.4Usage: tcpdump [-aAdDeflLnnopqRStuUvxX] [-c count] [ -C file_size ]                [ -E algo:secret ] [ -F file ] [ -i interface ] [ -M secret ]                [ -r file ] [ -s snaplen ] [ -T type ] [ -w file ]                [ -W filecount ] [ -y datalinktype ] [ -Z user ]                [ Expression ]
# tcpdump -i eth0 -n -w out.pcap -C 1 -Z roottcpdump: Listening on eth0,link-type EN10MB (Ethernet),capture size 96 bytes35 packets captured35 packets received by filter0 packets dropped by kernel
[+++][+++]07k[+++][+++][+++][+++][+++]",16) = 0fcntl(3,F_GETFL) = 0x2 (flags O_RDWR)fcntl(3,F_SETFL,O_RDWR|O_NONBLOCK) = 0recvfrom(3,0x7fff9563d35f,1,32,0) = -1 EAGAIN (Resource temporarily unavailable)fcntl(3,O_RDWR) = 0setsockopt(3,"[+++][+++][+++][+++][+++][+++]P73[+++][+++][+++][+++]",16) = 0open("out.pcap",O_WRONLY|O_CREAT|O_Trunc,0666) = -1 EACCES (Permission denIEd)write(2,"tcpdump: ",9tcpdump: ) = 9write(2,"out.pcap: Permission denIEd",27out.pcap: Permission denIEd) = 27write(2,"\n",1) = 1exit_group(1) = ?

你可以看到上面的strace结果,tcpdump将权限放入用户和组pcap(77).

[+++]

从tcpdump手册页,-C

[+++]

使用-Z用户指定特定用户

[+++] 总结

以上是内存溢出为你收集整理的linux – tcpdump:out.pcap:权限被拒绝全部内容,希望文章能够帮你解决linux – tcpdump:out.pcap:权限被拒绝所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

)
File: /www/wwwroot/outofmemory.cn/tmp/route_read.php, Line: 126, InsideLink()
File: /www/wwwroot/outofmemory.cn/tmp/index.inc.php, Line: 166, include(/www/wwwroot/outofmemory.cn/tmp/route_read.php)
File: /www/wwwroot/outofmemory.cn/index.php, Line: 30, include(/www/wwwroot/outofmemory.cn/tmp/index.inc.php)
Error[8]: Undefined offset: 8, File: /www/wwwroot/outofmemory.cn/tmp/plugin_ss_superseo_model_superseo.php, Line: 121
File: /www/wwwroot/outofmemory.cn/tmp/plugin_ss_superseo_model_superseo.php, Line: 473, decode(

概述[root@localhost ~]# cat /etc/issueFedora release 17 (Beefy Miracle)Kernel \r on an \m (\l)[root@localhost ~]# uname -aLinux localhost.localdomain 3.6.10-2.fc17.i686 #1 SMP Tue Dec 11 18:33:15 UTC
[root@localhost ~]# cat /etc/issueFedora release 17 (Beefy Miracle)Kernel \r on an \m (\l)[root@localhost ~]# uname -alinux localhost.localdomain 3.6.10-2.fc17.i686 #1 SMP Tue Dec 11 18:33:15 UTC 2012 i686 i686 i386 GNU/linux[root@localhost ~]# tcpdump -i p3p1 -n -w out.pcap -C 16tcpdump: out.pcap: Permission denIEd

为什么我会得到错误?

我该怎么办?

解决方法 我在Centos 5上试过,即使在tmp或root文件夹上也是如此.从tcpdump手册页中,在打开第一个savefile之前,与-Z选项(默认启用)一起使用时,将删除权限.因为您指定了“-C 1”,因为文件大小已经达到1而发生权限被拒绝,并且在创建新文件时它将引发权限被拒绝错误.所以只需指定-Z用户
# strace tcpdump -i eth0 -n -w out.pcap -C 1fstat(4,{st_mode=S_IFREG|0644,st_size=903,...}) = 0mmap(NulL,4096,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANONYMOUS,-1,0) = 0x2aea31934000lseek(4,SEEK_CUR)                   = 0read(4,"root:x:0:root\nbin:x:1:root,bin,d"...,4096) = 903read(4,"",4096)                       = 0close(4)                                = 0munmap(0x2aea31934000,4096)            = 0setgroups(1,[77])                      = 0setgID(77)                              = 0setuID(77)                              = 0setsockopt(3,Sol_SOCKET,SO_ATTACH_FILTER,"
# grep 77 /etc/grouppcap:x:77:# grep 77 /etc/passwdpcap:x:77:77::/var/arpwatch:/sbin/nologin
# man tcpdump       -C     Before writing a raw packet to a savefile,check whether the file is currently larger than file_size and,if so,close the current savefile and open a new one.  Savefiles after the first savefile will have the name  specifIEd              with  the -w flag,with a number after it,starting at 1 and continuing upward.  The units of file_size are mil-              lions of bytes (1,000,000 bytes,not 1,048,576 bytes).              **Note that when used with -Z option (enabled by default),privileges are dropped before opening first savefile.**# tcpdump --helptcpdump version 3.9.4libpcap version 0.9.4Usage: tcpdump [-aAdDeflLnnopqRStuUvxX] [-c count] [ -C file_size ]                [ -E algo:secret ] [ -F file ] [ -i interface ] [ -M secret ]                [ -r file ] [ -s snaplen ] [ -T type ] [ -w file ]                [ -W filecount ] [ -y datalinktype ] [ -Z user ]                [ Expression ]
# tcpdump -i eth0 -n -w out.pcap -C 1 -Z roottcpdump: Listening on eth0,link-type EN10MB (Ethernet),capture size 96 bytes35 packets captured35 packets received by filter0 packets dropped by kernel
[+++]07k[+++][+++][+++][+++][+++]",16) = 0fcntl(3,F_GETFL) = 0x2 (flags O_RDWR)fcntl(3,F_SETFL,O_RDWR|O_NONBLOCK) = 0recvfrom(3,0x7fff9563d35f,1,32,0) = -1 EAGAIN (Resource temporarily unavailable)fcntl(3,O_RDWR) = 0setsockopt(3,"[+++][+++][+++][+++][+++][+++]P73[+++][+++][+++][+++]",16) = 0open("out.pcap",O_WRONLY|O_CREAT|O_Trunc,0666) = -1 EACCES (Permission denIEd)write(2,"tcpdump: ",9tcpdump: ) = 9write(2,"out.pcap: Permission denIEd",27out.pcap: Permission denIEd) = 27write(2,"\n",1) = 1exit_group(1) = ?

你可以看到上面的strace结果,tcpdump将权限放入用户和组pcap(77).

[+++]

从tcpdump手册页,-C

[+++]

使用-Z用户指定特定用户

[+++] 总结

以上是内存溢出为你收集整理的linux – tcpdump:out.pcap:权限被拒绝全部内容,希望文章能够帮你解决linux – tcpdump:out.pcap:权限被拒绝所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

)
File: /www/wwwroot/outofmemory.cn/tmp/route_read.php, Line: 126, InsideLink()
File: /www/wwwroot/outofmemory.cn/tmp/index.inc.php, Line: 166, include(/www/wwwroot/outofmemory.cn/tmp/route_read.php)
File: /www/wwwroot/outofmemory.cn/index.php, Line: 30, include(/www/wwwroot/outofmemory.cn/tmp/index.inc.php)
Error[8]: Undefined offset: 9, File: /www/wwwroot/outofmemory.cn/tmp/plugin_ss_superseo_model_superseo.php, Line: 121
File: /www/wwwroot/outofmemory.cn/tmp/plugin_ss_superseo_model_superseo.php, Line: 473, decode(

概述[root@localhost ~]# cat /etc/issueFedora release 17 (Beefy Miracle)Kernel \r on an \m (\l)[root@localhost ~]# uname -aLinux localhost.localdomain 3.6.10-2.fc17.i686 #1 SMP Tue Dec 11 18:33:15 UTC
[root@localhost ~]# cat /etc/issueFedora release 17 (Beefy Miracle)Kernel \r on an \m (\l)[root@localhost ~]# uname -alinux localhost.localdomain 3.6.10-2.fc17.i686 #1 SMP Tue Dec 11 18:33:15 UTC 2012 i686 i686 i386 GNU/linux[root@localhost ~]# tcpdump -i p3p1 -n -w out.pcap -C 16tcpdump: out.pcap: Permission denIEd

为什么我会得到错误?

我该怎么办?

解决方法 我在Centos 5上试过,即使在tmp或root文件夹上也是如此.从tcpdump手册页中,在打开第一个savefile之前,与-Z选项(默认启用)一起使用时,将删除权限.因为您指定了“-C 1”,因为文件大小已经达到1而发生权限被拒绝,并且在创建新文件时它将引发权限被拒绝错误.所以只需指定-Z用户
# strace tcpdump -i eth0 -n -w out.pcap -C 1fstat(4,{st_mode=S_IFREG|0644,st_size=903,...}) = 0mmap(NulL,4096,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANONYMOUS,-1,0) = 0x2aea31934000lseek(4,SEEK_CUR)                   = 0read(4,"root:x:0:root\nbin:x:1:root,bin,d"...,4096) = 903read(4,"",4096)                       = 0close(4)                                = 0munmap(0x2aea31934000,4096)            = 0setgroups(1,[77])                      = 0setgID(77)                              = 0setuID(77)                              = 0setsockopt(3,Sol_SOCKET,SO_ATTACH_FILTER,"
# grep 77 /etc/grouppcap:x:77:# grep 77 /etc/passwdpcap:x:77:77::/var/arpwatch:/sbin/nologin
# man tcpdump       -C     Before writing a raw packet to a savefile,check whether the file is currently larger than file_size and,if so,close the current savefile and open a new one.  Savefiles after the first savefile will have the name  specifIEd              with  the -w flag,with a number after it,starting at 1 and continuing upward.  The units of file_size are mil-              lions of bytes (1,000,000 bytes,not 1,048,576 bytes).              **Note that when used with -Z option (enabled by default),privileges are dropped before opening first savefile.**# tcpdump --helptcpdump version 3.9.4libpcap version 0.9.4Usage: tcpdump [-aAdDeflLnnopqRStuUvxX] [-c count] [ -C file_size ]                [ -E algo:secret ] [ -F file ] [ -i interface ] [ -M secret ]                [ -r file ] [ -s snaplen ] [ -T type ] [ -w file ]                [ -W filecount ] [ -y datalinktype ] [ -Z user ]                [ Expression ]
# tcpdump -i eth0 -n -w out.pcap -C 1 -Z roottcpdump: Listening on eth0,link-type EN10MB (Ethernet),capture size 96 bytes35 packets captured35 packets received by filter0 packets dropped by kernel
07k[+++][+++][+++][+++][+++]",16) = 0fcntl(3,F_GETFL) = 0x2 (flags O_RDWR)fcntl(3,F_SETFL,O_RDWR|O_NONBLOCK) = 0recvfrom(3,0x7fff9563d35f,1,32,0) = -1 EAGAIN (Resource temporarily unavailable)fcntl(3,O_RDWR) = 0setsockopt(3,"[+++][+++][+++][+++][+++][+++]P73[+++][+++][+++][+++]",16) = 0open("out.pcap",O_WRONLY|O_CREAT|O_Trunc,0666) = -1 EACCES (Permission denIEd)write(2,"tcpdump: ",9tcpdump: ) = 9write(2,"out.pcap: Permission denIEd",27out.pcap: Permission denIEd) = 27write(2,"\n",1) = 1exit_group(1) = ?

你可以看到上面的strace结果,tcpdump将权限放入用户和组pcap(77).

[+++]

从tcpdump手册页,-C

[+++]

使用-Z用户指定特定用户

[+++] 总结

以上是内存溢出为你收集整理的linux – tcpdump:out.pcap:权限被拒绝全部内容,希望文章能够帮你解决linux – tcpdump:out.pcap:权限被拒绝所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

)
File: /www/wwwroot/outofmemory.cn/tmp/route_read.php, Line: 126, InsideLink()
File: /www/wwwroot/outofmemory.cn/tmp/index.inc.php, Line: 166, include(/www/wwwroot/outofmemory.cn/tmp/route_read.php)
File: /www/wwwroot/outofmemory.cn/index.php, Line: 30, include(/www/wwwroot/outofmemory.cn/tmp/index.inc.php)
Error[8]: Undefined offset: 10, File: /www/wwwroot/outofmemory.cn/tmp/plugin_ss_superseo_model_superseo.php, Line: 121
File: /www/wwwroot/outofmemory.cn/tmp/plugin_ss_superseo_model_superseo.php, Line: 473, decode(

概述[root@localhost ~]# cat /etc/issueFedora release 17 (Beefy Miracle)Kernel \r on an \m (\l)[root@localhost ~]# uname -aLinux localhost.localdomain 3.6.10-2.fc17.i686 #1 SMP Tue Dec 11 18:33:15 UTC
[root@localhost ~]# cat /etc/issueFedora release 17 (Beefy Miracle)Kernel \r on an \m (\l)[root@localhost ~]# uname -alinux localhost.localdomain 3.6.10-2.fc17.i686 #1 SMP Tue Dec 11 18:33:15 UTC 2012 i686 i686 i386 GNU/linux[root@localhost ~]# tcpdump -i p3p1 -n -w out.pcap -C 16tcpdump: out.pcap: Permission denIEd

为什么我会得到错误?

我该怎么办?

解决方法 我在Centos 5上试过,即使在tmp或root文件夹上也是如此.从tcpdump手册页中,在打开第一个savefile之前,与-Z选项(默认启用)一起使用时,将删除权限.因为您指定了“-C 1”,因为文件大小已经达到1而发生权限被拒绝,并且在创建新文件时它将引发权限被拒绝错误.所以只需指定-Z用户
# strace tcpdump -i eth0 -n -w out.pcap -C 1fstat(4,{st_mode=S_IFREG|0644,st_size=903,...}) = 0mmap(NulL,4096,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANONYMOUS,-1,0) = 0x2aea31934000lseek(4,SEEK_CUR)                   = 0read(4,"root:x:0:root\nbin:x:1:root,bin,d"...,4096) = 903read(4,"",4096)                       = 0close(4)                                = 0munmap(0x2aea31934000,4096)            = 0setgroups(1,[77])                      = 0setgID(77)                              = 0setuID(77)                              = 0setsockopt(3,Sol_SOCKET,SO_ATTACH_FILTER,"
# grep 77 /etc/grouppcap:x:77:# grep 77 /etc/passwdpcap:x:77:77::/var/arpwatch:/sbin/nologin
# man tcpdump       -C     Before writing a raw packet to a savefile,check whether the file is currently larger than file_size and,if so,close the current savefile and open a new one.  Savefiles after the first savefile will have the name  specifIEd              with  the -w flag,with a number after it,starting at 1 and continuing upward.  The units of file_size are mil-              lions of bytes (1,000,000 bytes,not 1,048,576 bytes).              **Note that when used with -Z option (enabled by default),privileges are dropped before opening first savefile.**# tcpdump --helptcpdump version 3.9.4libpcap version 0.9.4Usage: tcpdump [-aAdDeflLnnopqRStuUvxX] [-c count] [ -C file_size ]                [ -E algo:secret ] [ -F file ] [ -i interface ] [ -M secret ]                [ -r file ] [ -s snaplen ] [ -T type ] [ -w file ]                [ -W filecount ] [ -y datalinktype ] [ -Z user ]                [ Expression ]
# tcpdump -i eth0 -n -w out.pcap -C 1 -Z roottcpdump: Listening on eth0,link-type EN10MB (Ethernet),capture size 96 bytes35 packets captured35 packets received by filter0 packets dropped by kernel
07k[+++][+++][+++][+++]",16) = 0fcntl(3,F_GETFL) = 0x2 (flags O_RDWR)fcntl(3,F_SETFL,O_RDWR|O_NONBLOCK) = 0recvfrom(3,0x7fff9563d35f,1,32,0) = -1 EAGAIN (Resource temporarily unavailable)fcntl(3,O_RDWR) = 0setsockopt(3,"[+++][+++][+++][+++][+++][+++]P73[+++][+++][+++][+++]",16) = 0open("out.pcap",O_WRONLY|O_CREAT|O_Trunc,0666) = -1 EACCES (Permission denIEd)write(2,"tcpdump: ",9tcpdump: ) = 9write(2,"out.pcap: Permission denIEd",27out.pcap: Permission denIEd) = 27write(2,"\n",1) = 1exit_group(1) = ?

你可以看到上面的strace结果,tcpdump将权限放入用户和组pcap(77).

[+++]

从tcpdump手册页,-C

[+++]

使用-Z用户指定特定用户

[+++] 总结

以上是内存溢出为你收集整理的linux – tcpdump:out.pcap:权限被拒绝全部内容,希望文章能够帮你解决linux – tcpdump:out.pcap:权限被拒绝所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

)
File: /www/wwwroot/outofmemory.cn/tmp/route_read.php, Line: 126, InsideLink()
File: /www/wwwroot/outofmemory.cn/tmp/index.inc.php, Line: 166, include(/www/wwwroot/outofmemory.cn/tmp/route_read.php)
File: /www/wwwroot/outofmemory.cn/index.php, Line: 30, include(/www/wwwroot/outofmemory.cn/tmp/index.inc.php)
Error[8]: Undefined offset: 11, File: /www/wwwroot/outofmemory.cn/tmp/plugin_ss_superseo_model_superseo.php, Line: 121
File: /www/wwwroot/outofmemory.cn/tmp/plugin_ss_superseo_model_superseo.php, Line: 473, decode(

概述[root@localhost ~]# cat /etc/issueFedora release 17 (Beefy Miracle)Kernel \r on an \m (\l)[root@localhost ~]# uname -aLinux localhost.localdomain 3.6.10-2.fc17.i686 #1 SMP Tue Dec 11 18:33:15 UTC
[root@localhost ~]# cat /etc/issueFedora release 17 (Beefy Miracle)Kernel \r on an \m (\l)[root@localhost ~]# uname -alinux localhost.localdomain 3.6.10-2.fc17.i686 #1 SMP Tue Dec 11 18:33:15 UTC 2012 i686 i686 i386 GNU/linux[root@localhost ~]# tcpdump -i p3p1 -n -w out.pcap -C 16tcpdump: out.pcap: Permission denIEd

为什么我会得到错误?

我该怎么办?

解决方法 我在Centos 5上试过,即使在tmp或root文件夹上也是如此.从tcpdump手册页中,在打开第一个savefile之前,与-Z选项(默认启用)一起使用时,将删除权限.因为您指定了“-C 1”,因为文件大小已经达到1而发生权限被拒绝,并且在创建新文件时它将引发权限被拒绝错误.所以只需指定-Z用户
# strace tcpdump -i eth0 -n -w out.pcap -C 1fstat(4,{st_mode=S_IFREG|0644,st_size=903,...}) = 0mmap(NulL,4096,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANONYMOUS,-1,0) = 0x2aea31934000lseek(4,SEEK_CUR)                   = 0read(4,"root:x:0:root\nbin:x:1:root,bin,d"...,4096) = 903read(4,"",4096)                       = 0close(4)                                = 0munmap(0x2aea31934000,4096)            = 0setgroups(1,[77])                      = 0setgID(77)                              = 0setuID(77)                              = 0setsockopt(3,Sol_SOCKET,SO_ATTACH_FILTER,"
# grep 77 /etc/grouppcap:x:77:# grep 77 /etc/passwdpcap:x:77:77::/var/arpwatch:/sbin/nologin
# man tcpdump       -C     Before writing a raw packet to a savefile,check whether the file is currently larger than file_size and,if so,close the current savefile and open a new one.  Savefiles after the first savefile will have the name  specifIEd              with  the -w flag,with a number after it,starting at 1 and continuing upward.  The units of file_size are mil-              lions of bytes (1,000,000 bytes,not 1,048,576 bytes).              **Note that when used with -Z option (enabled by default),privileges are dropped before opening first savefile.**# tcpdump --helptcpdump version 3.9.4libpcap version 0.9.4Usage: tcpdump [-aAdDeflLnnopqRStuUvxX] [-c count] [ -C file_size ]                [ -E algo:secret ] [ -F file ] [ -i interface ] [ -M secret ]                [ -r file ] [ -s snaplen ] [ -T type ] [ -w file ]                [ -W filecount ] [ -y datalinktype ] [ -Z user ]                [ Expression ]
# tcpdump -i eth0 -n -w out.pcap -C 1 -Z roottcpdump: Listening on eth0,link-type EN10MB (Ethernet),capture size 96 bytes35 packets captured35 packets received by filter0 packets dropped by kernel
07k[+++][+++][+++]",16) = 0fcntl(3,F_GETFL) = 0x2 (flags O_RDWR)fcntl(3,F_SETFL,O_RDWR|O_NONBLOCK) = 0recvfrom(3,0x7fff9563d35f,1,32,0) = -1 EAGAIN (Resource temporarily unavailable)fcntl(3,O_RDWR) = 0setsockopt(3,"[+++][+++][+++][+++][+++][+++]P73[+++][+++][+++][+++]",16) = 0open("out.pcap",O_WRONLY|O_CREAT|O_Trunc,0666) = -1 EACCES (Permission denIEd)write(2,"tcpdump: ",9tcpdump: ) = 9write(2,"out.pcap: Permission denIEd",27out.pcap: Permission denIEd) = 27write(2,"\n",1) = 1exit_group(1) = ?

你可以看到上面的strace结果,tcpdump将权限放入用户和组pcap(77).

[+++]

从tcpdump手册页,-C

[+++]

使用-Z用户指定特定用户

[+++] 总结

以上是内存溢出为你收集整理的linux – tcpdump:out.pcap:权限被拒绝全部内容,希望文章能够帮你解决linux – tcpdump:out.pcap:权限被拒绝所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

)
File: /www/wwwroot/outofmemory.cn/tmp/route_read.php, Line: 126, InsideLink()
File: /www/wwwroot/outofmemory.cn/tmp/index.inc.php, Line: 166, include(/www/wwwroot/outofmemory.cn/tmp/route_read.php)
File: /www/wwwroot/outofmemory.cn/index.php, Line: 30, include(/www/wwwroot/outofmemory.cn/tmp/index.inc.php)
Error[8]: Undefined offset: 12, File: /www/wwwroot/outofmemory.cn/tmp/plugin_ss_superseo_model_superseo.php, Line: 121
File: /www/wwwroot/outofmemory.cn/tmp/plugin_ss_superseo_model_superseo.php, Line: 473, decode(

概述[root@localhost ~]# cat /etc/issueFedora release 17 (Beefy Miracle)Kernel \r on an \m (\l)[root@localhost ~]# uname -aLinux localhost.localdomain 3.6.10-2.fc17.i686 #1 SMP Tue Dec 11 18:33:15 UTC
[root@localhost ~]# cat /etc/issueFedora release 17 (Beefy Miracle)Kernel \r on an \m (\l)[root@localhost ~]# uname -alinux localhost.localdomain 3.6.10-2.fc17.i686 #1 SMP Tue Dec 11 18:33:15 UTC 2012 i686 i686 i386 GNU/linux[root@localhost ~]# tcpdump -i p3p1 -n -w out.pcap -C 16tcpdump: out.pcap: Permission denIEd

为什么我会得到错误?

我该怎么办?

解决方法 我在Centos 5上试过,即使在tmp或root文件夹上也是如此.从tcpdump手册页中,在打开第一个savefile之前,与-Z选项(默认启用)一起使用时,将删除权限.因为您指定了“-C 1”,因为文件大小已经达到1而发生权限被拒绝,并且在创建新文件时它将引发权限被拒绝错误.所以只需指定-Z用户
# strace tcpdump -i eth0 -n -w out.pcap -C 1fstat(4,{st_mode=S_IFREG|0644,st_size=903,...}) = 0mmap(NulL,4096,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANONYMOUS,-1,0) = 0x2aea31934000lseek(4,SEEK_CUR)                   = 0read(4,"root:x:0:root\nbin:x:1:root,bin,d"...,4096) = 903read(4,"",4096)                       = 0close(4)                                = 0munmap(0x2aea31934000,4096)            = 0setgroups(1,[77])                      = 0setgID(77)                              = 0setuID(77)                              = 0setsockopt(3,Sol_SOCKET,SO_ATTACH_FILTER,"
# grep 77 /etc/grouppcap:x:77:# grep 77 /etc/passwdpcap:x:77:77::/var/arpwatch:/sbin/nologin
# man tcpdump       -C     Before writing a raw packet to a savefile,check whether the file is currently larger than file_size and,if so,close the current savefile and open a new one.  Savefiles after the first savefile will have the name  specifIEd              with  the -w flag,with a number after it,starting at 1 and continuing upward.  The units of file_size are mil-              lions of bytes (1,000,000 bytes,not 1,048,576 bytes).              **Note that when used with -Z option (enabled by default),privileges are dropped before opening first savefile.**# tcpdump --helptcpdump version 3.9.4libpcap version 0.9.4Usage: tcpdump [-aAdDeflLnnopqRStuUvxX] [-c count] [ -C file_size ]                [ -E algo:secret ] [ -F file ] [ -i interface ] [ -M secret ]                [ -r file ] [ -s snaplen ] [ -T type ] [ -w file ]                [ -W filecount ] [ -y datalinktype ] [ -Z user ]                [ Expression ]
# tcpdump -i eth0 -n -w out.pcap -C 1 -Z roottcpdump: Listening on eth0,link-type EN10MB (Ethernet),capture size 96 bytes35 packets captured35 packets received by filter0 packets dropped by kernel
07k[+++][+++]",16) = 0fcntl(3,F_GETFL) = 0x2 (flags O_RDWR)fcntl(3,F_SETFL,O_RDWR|O_NONBLOCK) = 0recvfrom(3,0x7fff9563d35f,1,32,0) = -1 EAGAIN (Resource temporarily unavailable)fcntl(3,O_RDWR) = 0setsockopt(3,"[+++][+++][+++][+++][+++][+++]P73[+++][+++][+++][+++]",16) = 0open("out.pcap",O_WRONLY|O_CREAT|O_Trunc,0666) = -1 EACCES (Permission denIEd)write(2,"tcpdump: ",9tcpdump: ) = 9write(2,"out.pcap: Permission denIEd",27out.pcap: Permission denIEd) = 27write(2,"\n",1) = 1exit_group(1) = ?

你可以看到上面的strace结果,tcpdump将权限放入用户和组pcap(77).

[+++]

从tcpdump手册页,-C

[+++]

使用-Z用户指定特定用户

[+++] 总结

以上是内存溢出为你收集整理的linux – tcpdump:out.pcap:权限被拒绝全部内容,希望文章能够帮你解决linux – tcpdump:out.pcap:权限被拒绝所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

)
File: /www/wwwroot/outofmemory.cn/tmp/route_read.php, Line: 126, InsideLink()
File: /www/wwwroot/outofmemory.cn/tmp/index.inc.php, Line: 166, include(/www/wwwroot/outofmemory.cn/tmp/route_read.php)
File: /www/wwwroot/outofmemory.cn/index.php, Line: 30, include(/www/wwwroot/outofmemory.cn/tmp/index.inc.php)
Error[8]: Undefined offset: 13, File: /www/wwwroot/outofmemory.cn/tmp/plugin_ss_superseo_model_superseo.php, Line: 121
File: /www/wwwroot/outofmemory.cn/tmp/plugin_ss_superseo_model_superseo.php, Line: 473, decode(

概述[root@localhost ~]# cat /etc/issueFedora release 17 (Beefy Miracle)Kernel \r on an \m (\l)[root@localhost ~]# uname -aLinux localhost.localdomain 3.6.10-2.fc17.i686 #1 SMP Tue Dec 11 18:33:15 UTC
[root@localhost ~]# cat /etc/issueFedora release 17 (Beefy Miracle)Kernel \r on an \m (\l)[root@localhost ~]# uname -alinux localhost.localdomain 3.6.10-2.fc17.i686 #1 SMP Tue Dec 11 18:33:15 UTC 2012 i686 i686 i386 GNU/linux[root@localhost ~]# tcpdump -i p3p1 -n -w out.pcap -C 16tcpdump: out.pcap: Permission denIEd

为什么我会得到错误?

我该怎么办?

解决方法 我在Centos 5上试过,即使在tmp或root文件夹上也是如此.从tcpdump手册页中,在打开第一个savefile之前,与-Z选项(默认启用)一起使用时,将删除权限.因为您指定了“-C 1”,因为文件大小已经达到1而发生权限被拒绝,并且在创建新文件时它将引发权限被拒绝错误.所以只需指定-Z用户
# strace tcpdump -i eth0 -n -w out.pcap -C 1fstat(4,{st_mode=S_IFREG|0644,st_size=903,...}) = 0mmap(NulL,4096,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANONYMOUS,-1,0) = 0x2aea31934000lseek(4,SEEK_CUR)                   = 0read(4,"root:x:0:root\nbin:x:1:root,bin,d"...,4096) = 903read(4,"",4096)                       = 0close(4)                                = 0munmap(0x2aea31934000,4096)            = 0setgroups(1,[77])                      = 0setgID(77)                              = 0setuID(77)                              = 0setsockopt(3,Sol_SOCKET,SO_ATTACH_FILTER,"
# grep 77 /etc/grouppcap:x:77:# grep 77 /etc/passwdpcap:x:77:77::/var/arpwatch:/sbin/nologin
# man tcpdump       -C     Before writing a raw packet to a savefile,check whether the file is currently larger than file_size and,if so,close the current savefile and open a new one.  Savefiles after the first savefile will have the name  specifIEd              with  the -w flag,with a number after it,starting at 1 and continuing upward.  The units of file_size are mil-              lions of bytes (1,000,000 bytes,not 1,048,576 bytes).              **Note that when used with -Z option (enabled by default),privileges are dropped before opening first savefile.**# tcpdump --helptcpdump version 3.9.4libpcap version 0.9.4Usage: tcpdump [-aAdDeflLnnopqRStuUvxX] [-c count] [ -C file_size ]                [ -E algo:secret ] [ -F file ] [ -i interface ] [ -M secret ]                [ -r file ] [ -s snaplen ] [ -T type ] [ -w file ]                [ -W filecount ] [ -y datalinktype ] [ -Z user ]                [ Expression ]
# tcpdump -i eth0 -n -w out.pcap -C 1 -Z roottcpdump: Listening on eth0,link-type EN10MB (Ethernet),capture size 96 bytes35 packets captured35 packets received by filter0 packets dropped by kernel
07k[+++]",16) = 0fcntl(3,F_GETFL) = 0x2 (flags O_RDWR)fcntl(3,F_SETFL,O_RDWR|O_NONBLOCK) = 0recvfrom(3,0x7fff9563d35f,1,32,0) = -1 EAGAIN (Resource temporarily unavailable)fcntl(3,O_RDWR) = 0setsockopt(3,"[+++][+++][+++][+++][+++][+++]P73[+++][+++][+++][+++]",16) = 0open("out.pcap",O_WRONLY|O_CREAT|O_Trunc,0666) = -1 EACCES (Permission denIEd)write(2,"tcpdump: ",9tcpdump: ) = 9write(2,"out.pcap: Permission denIEd",27out.pcap: Permission denIEd) = 27write(2,"\n",1) = 1exit_group(1) = ?

你可以看到上面的strace结果,tcpdump将权限放入用户和组pcap(77).

[+++]

从tcpdump手册页,-C

[+++]

使用-Z用户指定特定用户

[+++] 总结

以上是内存溢出为你收集整理的linux – tcpdump:out.pcap:权限被拒绝全部内容,希望文章能够帮你解决linux – tcpdump:out.pcap:权限被拒绝所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

)
File: /www/wwwroot/outofmemory.cn/tmp/route_read.php, Line: 126, InsideLink()
File: /www/wwwroot/outofmemory.cn/tmp/index.inc.php, Line: 166, include(/www/wwwroot/outofmemory.cn/tmp/route_read.php)
File: /www/wwwroot/outofmemory.cn/index.php, Line: 30, include(/www/wwwroot/outofmemory.cn/tmp/index.inc.php)
Error[8]: Undefined offset: 14, File: /www/wwwroot/outofmemory.cn/tmp/plugin_ss_superseo_model_superseo.php, Line: 121
File: /www/wwwroot/outofmemory.cn/tmp/plugin_ss_superseo_model_superseo.php, Line: 473, decode(

概述[root@localhost ~]# cat /etc/issueFedora release 17 (Beefy Miracle)Kernel \r on an \m (\l)[root@localhost ~]# uname -aLinux localhost.localdomain 3.6.10-2.fc17.i686 #1 SMP Tue Dec 11 18:33:15 UTC
[root@localhost ~]# cat /etc/issueFedora release 17 (Beefy Miracle)Kernel \r on an \m (\l)[root@localhost ~]# uname -alinux localhost.localdomain 3.6.10-2.fc17.i686 #1 SMP Tue Dec 11 18:33:15 UTC 2012 i686 i686 i386 GNU/linux[root@localhost ~]# tcpdump -i p3p1 -n -w out.pcap -C 16tcpdump: out.pcap: Permission denIEd

为什么我会得到错误?

我该怎么办?

解决方法 我在Centos 5上试过,即使在tmp或root文件夹上也是如此.从tcpdump手册页中,在打开第一个savefile之前,与-Z选项(默认启用)一起使用时,将删除权限.因为您指定了“-C 1”,因为文件大小已经达到1而发生权限被拒绝,并且在创建新文件时它将引发权限被拒绝错误.所以只需指定-Z用户
# strace tcpdump -i eth0 -n -w out.pcap -C 1fstat(4,{st_mode=S_IFREG|0644,st_size=903,...}) = 0mmap(NulL,4096,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANONYMOUS,-1,0) = 0x2aea31934000lseek(4,SEEK_CUR)                   = 0read(4,"root:x:0:root\nbin:x:1:root,bin,d"...,4096) = 903read(4,"",4096)                       = 0close(4)                                = 0munmap(0x2aea31934000,4096)            = 0setgroups(1,[77])                      = 0setgID(77)                              = 0setuID(77)                              = 0setsockopt(3,Sol_SOCKET,SO_ATTACH_FILTER,"
# grep 77 /etc/grouppcap:x:77:# grep 77 /etc/passwdpcap:x:77:77::/var/arpwatch:/sbin/nologin
# man tcpdump       -C     Before writing a raw packet to a savefile,check whether the file is currently larger than file_size and,if so,close the current savefile and open a new one.  Savefiles after the first savefile will have the name  specifIEd              with  the -w flag,with a number after it,starting at 1 and continuing upward.  The units of file_size are mil-              lions of bytes (1,000,000 bytes,not 1,048,576 bytes).              **Note that when used with -Z option (enabled by default),privileges are dropped before opening first savefile.**# tcpdump --helptcpdump version 3.9.4libpcap version 0.9.4Usage: tcpdump [-aAdDeflLnnopqRStuUvxX] [-c count] [ -C file_size ]                [ -E algo:secret ] [ -F file ] [ -i interface ] [ -M secret ]                [ -r file ] [ -s snaplen ] [ -T type ] [ -w file ]                [ -W filecount ] [ -y datalinktype ] [ -Z user ]                [ Expression ]
# tcpdump -i eth0 -n -w out.pcap -C 1 -Z roottcpdump: Listening on eth0,link-type EN10MB (Ethernet),capture size 96 bytes35 packets captured35 packets received by filter0 packets dropped by kernel
07k",16) = 0fcntl(3,F_GETFL) = 0x2 (flags O_RDWR)fcntl(3,F_SETFL,O_RDWR|O_NONBLOCK) = 0recvfrom(3,0x7fff9563d35f,1,32,0) = -1 EAGAIN (Resource temporarily unavailable)fcntl(3,O_RDWR) = 0setsockopt(3,"[+++][+++][+++][+++][+++][+++]P73[+++][+++][+++][+++]",16) = 0open("out.pcap",O_WRONLY|O_CREAT|O_Trunc,0666) = -1 EACCES (Permission denIEd)write(2,"tcpdump: ",9tcpdump: ) = 9write(2,"out.pcap: Permission denIEd",27out.pcap: Permission denIEd) = 27write(2,"\n",1) = 1exit_group(1) = ?

你可以看到上面的strace结果,tcpdump将权限放入用户和组pcap(77).

[+++]

从tcpdump手册页,-C

[+++]

使用-Z用户指定特定用户

[+++] 总结

以上是内存溢出为你收集整理的linux – tcpdump:out.pcap:权限被拒绝全部内容,希望文章能够帮你解决linux – tcpdump:out.pcap:权限被拒绝所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

)
File: /www/wwwroot/outofmemory.cn/tmp/route_read.php, Line: 126, InsideLink()
File: /www/wwwroot/outofmemory.cn/tmp/index.inc.php, Line: 166, include(/www/wwwroot/outofmemory.cn/tmp/route_read.php)
File: /www/wwwroot/outofmemory.cn/index.php, Line: 30, include(/www/wwwroot/outofmemory.cn/tmp/index.inc.php)
Error[8]: Undefined offset: 15, File: /www/wwwroot/outofmemory.cn/tmp/plugin_ss_superseo_model_superseo.php, Line: 121
File: /www/wwwroot/outofmemory.cn/tmp/plugin_ss_superseo_model_superseo.php, Line: 473, decode(

概述[root@localhost ~]# cat /etc/issueFedora release 17 (Beefy Miracle)Kernel \r on an \m (\l)[root@localhost ~]# uname -aLinux localhost.localdomain 3.6.10-2.fc17.i686 #1 SMP Tue Dec 11 18:33:15 UTC
[root@localhost ~]# cat /etc/issueFedora release 17 (Beefy Miracle)Kernel \r on an \m (\l)[root@localhost ~]# uname -alinux localhost.localdomain 3.6.10-2.fc17.i686 #1 SMP Tue Dec 11 18:33:15 UTC 2012 i686 i686 i386 GNU/linux[root@localhost ~]# tcpdump -i p3p1 -n -w out.pcap -C 16tcpdump: out.pcap: Permission denIEd

为什么我会得到错误?

我该怎么办?

解决方法 我在Centos 5上试过,即使在tmp或root文件夹上也是如此.从tcpdump手册页中,在打开第一个savefile之前,与-Z选项(默认启用)一起使用时,将删除权限.因为您指定了“-C 1”,因为文件大小已经达到1而发生权限被拒绝,并且在创建新文件时它将引发权限被拒绝错误.所以只需指定-Z用户
# strace tcpdump -i eth0 -n -w out.pcap -C 1fstat(4,{st_mode=S_IFREG|0644,st_size=903,...}) = 0mmap(NulL,4096,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANONYMOUS,-1,0) = 0x2aea31934000lseek(4,SEEK_CUR)                   = 0read(4,"root:x:0:root\nbin:x:1:root,bin,d"...,4096) = 903read(4,"",4096)                       = 0close(4)                                = 0munmap(0x2aea31934000,4096)            = 0setgroups(1,[77])                      = 0setgID(77)                              = 0setuID(77)                              = 0setsockopt(3,Sol_SOCKET,SO_ATTACH_FILTER,"
# grep 77 /etc/grouppcap:x:77:# grep 77 /etc/passwdpcap:x:77:77::/var/arpwatch:/sbin/nologin
# man tcpdump       -C     Before writing a raw packet to a savefile,check whether the file is currently larger than file_size and,if so,close the current savefile and open a new one.  Savefiles after the first savefile will have the name  specifIEd              with  the -w flag,with a number after it,starting at 1 and continuing upward.  The units of file_size are mil-              lions of bytes (1,000,000 bytes,not 1,048,576 bytes).              **Note that when used with -Z option (enabled by default),privileges are dropped before opening first savefile.**# tcpdump --helptcpdump version 3.9.4libpcap version 0.9.4Usage: tcpdump [-aAdDeflLnnopqRStuUvxX] [-c count] [ -C file_size ]                [ -E algo:secret ] [ -F file ] [ -i interface ] [ -M secret ]                [ -r file ] [ -s snaplen ] [ -T type ] [ -w file ]                [ -W filecount ] [ -y datalinktype ] [ -Z user ]                [ Expression ]
# tcpdump -i eth0 -n -w out.pcap -C 1 -Z roottcpdump: Listening on eth0,link-type EN10MB (Ethernet),capture size 96 bytes35 packets captured35 packets received by filter0 packets dropped by kernel
07k",16) = 0fcntl(3,F_GETFL) = 0x2 (flags O_RDWR)fcntl(3,F_SETFL,O_RDWR|O_NONBLOCK) = 0recvfrom(3,0x7fff9563d35f,1,32,0) = -1 EAGAIN (Resource temporarily unavailable)fcntl(3,O_RDWR) = 0setsockopt(3,"[+++][+++][+++][+++][+++]P73[+++][+++][+++][+++]",16) = 0open("out.pcap",O_WRONLY|O_CREAT|O_Trunc,0666) = -1 EACCES (Permission denIEd)write(2,"tcpdump: ",9tcpdump: ) = 9write(2,"out.pcap: Permission denIEd",27out.pcap: Permission denIEd) = 27write(2,"\n",1) = 1exit_group(1) = ?

你可以看到上面的strace结果,tcpdump将权限放入用户和组pcap(77).

[+++]

从tcpdump手册页,-C

[+++]

使用-Z用户指定特定用户

[+++] 总结

以上是内存溢出为你收集整理的linux – tcpdump:out.pcap:权限被拒绝全部内容,希望文章能够帮你解决linux – tcpdump:out.pcap:权限被拒绝所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

)
File: /www/wwwroot/outofmemory.cn/tmp/route_read.php, Line: 126, InsideLink()
File: /www/wwwroot/outofmemory.cn/tmp/index.inc.php, Line: 166, include(/www/wwwroot/outofmemory.cn/tmp/route_read.php)
File: /www/wwwroot/outofmemory.cn/index.php, Line: 30, include(/www/wwwroot/outofmemory.cn/tmp/index.inc.php)
Error[8]: Undefined offset: 16, File: /www/wwwroot/outofmemory.cn/tmp/plugin_ss_superseo_model_superseo.php, Line: 121
File: /www/wwwroot/outofmemory.cn/tmp/plugin_ss_superseo_model_superseo.php, Line: 473, decode(

概述[root@localhost ~]# cat /etc/issueFedora release 17 (Beefy Miracle)Kernel \r on an \m (\l)[root@localhost ~]# uname -aLinux localhost.localdomain 3.6.10-2.fc17.i686 #1 SMP Tue Dec 11 18:33:15 UTC
[root@localhost ~]# cat /etc/issueFedora release 17 (Beefy Miracle)Kernel \r on an \m (\l)[root@localhost ~]# uname -alinux localhost.localdomain 3.6.10-2.fc17.i686 #1 SMP Tue Dec 11 18:33:15 UTC 2012 i686 i686 i386 GNU/linux[root@localhost ~]# tcpdump -i p3p1 -n -w out.pcap -C 16tcpdump: out.pcap: Permission denIEd

为什么我会得到错误?

我该怎么办?

解决方法 我在Centos 5上试过,即使在tmp或root文件夹上也是如此.从tcpdump手册页中,在打开第一个savefile之前,与-Z选项(默认启用)一起使用时,将删除权限.因为您指定了“-C 1”,因为文件大小已经达到1而发生权限被拒绝,并且在创建新文件时它将引发权限被拒绝错误.所以只需指定-Z用户
# strace tcpdump -i eth0 -n -w out.pcap -C 1fstat(4,{st_mode=S_IFREG|0644,st_size=903,...}) = 0mmap(NulL,4096,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANONYMOUS,-1,0) = 0x2aea31934000lseek(4,SEEK_CUR)                   = 0read(4,"root:x:0:root\nbin:x:1:root,bin,d"...,4096) = 903read(4,"",4096)                       = 0close(4)                                = 0munmap(0x2aea31934000,4096)            = 0setgroups(1,[77])                      = 0setgID(77)                              = 0setuID(77)                              = 0setsockopt(3,Sol_SOCKET,SO_ATTACH_FILTER,"
# grep 77 /etc/grouppcap:x:77:# grep 77 /etc/passwdpcap:x:77:77::/var/arpwatch:/sbin/nologin
# man tcpdump       -C     Before writing a raw packet to a savefile,check whether the file is currently larger than file_size and,if so,close the current savefile and open a new one.  Savefiles after the first savefile will have the name  specifIEd              with  the -w flag,with a number after it,starting at 1 and continuing upward.  The units of file_size are mil-              lions of bytes (1,000,000 bytes,not 1,048,576 bytes).              **Note that when used with -Z option (enabled by default),privileges are dropped before opening first savefile.**# tcpdump --helptcpdump version 3.9.4libpcap version 0.9.4Usage: tcpdump [-aAdDeflLnnopqRStuUvxX] [-c count] [ -C file_size ]                [ -E algo:secret ] [ -F file ] [ -i interface ] [ -M secret ]                [ -r file ] [ -s snaplen ] [ -T type ] [ -w file ]                [ -W filecount ] [ -y datalinktype ] [ -Z user ]                [ Expression ]
# tcpdump -i eth0 -n -w out.pcap -C 1 -Z roottcpdump: Listening on eth0,link-type EN10MB (Ethernet),capture size 96 bytes35 packets captured35 packets received by filter0 packets dropped by kernel
07k",16) = 0fcntl(3,F_GETFL) = 0x2 (flags O_RDWR)fcntl(3,F_SETFL,O_RDWR|O_NONBLOCK) = 0recvfrom(3,0x7fff9563d35f,1,32,0) = -1 EAGAIN (Resource temporarily unavailable)fcntl(3,O_RDWR) = 0setsockopt(3,"[+++][+++][+++][+++]P73[+++][+++][+++][+++]",16) = 0open("out.pcap",O_WRONLY|O_CREAT|O_Trunc,0666) = -1 EACCES (Permission denIEd)write(2,"tcpdump: ",9tcpdump: ) = 9write(2,"out.pcap: Permission denIEd",27out.pcap: Permission denIEd) = 27write(2,"\n",1) = 1exit_group(1) = ?

你可以看到上面的strace结果,tcpdump将权限放入用户和组pcap(77).

[+++]

从tcpdump手册页,-C

[+++]

使用-Z用户指定特定用户

[+++] 总结

以上是内存溢出为你收集整理的linux – tcpdump:out.pcap:权限被拒绝全部内容,希望文章能够帮你解决linux – tcpdump:out.pcap:权限被拒绝所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

)
File: /www/wwwroot/outofmemory.cn/tmp/route_read.php, Line: 126, InsideLink()
File: /www/wwwroot/outofmemory.cn/tmp/index.inc.php, Line: 166, include(/www/wwwroot/outofmemory.cn/tmp/route_read.php)
File: /www/wwwroot/outofmemory.cn/index.php, Line: 30, include(/www/wwwroot/outofmemory.cn/tmp/index.inc.php)
Error[8]: Undefined offset: 17, File: /www/wwwroot/outofmemory.cn/tmp/plugin_ss_superseo_model_superseo.php, Line: 121
File: /www/wwwroot/outofmemory.cn/tmp/plugin_ss_superseo_model_superseo.php, Line: 473, decode(

概述[root@localhost ~]# cat /etc/issueFedora release 17 (Beefy Miracle)Kernel \r on an \m (\l)[root@localhost ~]# uname -aLinux localhost.localdomain 3.6.10-2.fc17.i686 #1 SMP Tue Dec 11 18:33:15 UTC
[root@localhost ~]# cat /etc/issueFedora release 17 (Beefy Miracle)Kernel \r on an \m (\l)[root@localhost ~]# uname -alinux localhost.localdomain 3.6.10-2.fc17.i686 #1 SMP Tue Dec 11 18:33:15 UTC 2012 i686 i686 i386 GNU/linux[root@localhost ~]# tcpdump -i p3p1 -n -w out.pcap -C 16tcpdump: out.pcap: Permission denIEd

为什么我会得到错误?

我该怎么办?

解决方法 我在Centos 5上试过,即使在tmp或root文件夹上也是如此.从tcpdump手册页中,在打开第一个savefile之前,与-Z选项(默认启用)一起使用时,将删除权限.因为您指定了“-C 1”,因为文件大小已经达到1而发生权限被拒绝,并且在创建新文件时它将引发权限被拒绝错误.所以只需指定-Z用户
# strace tcpdump -i eth0 -n -w out.pcap -C 1fstat(4,{st_mode=S_IFREG|0644,st_size=903,...}) = 0mmap(NulL,4096,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANONYMOUS,-1,0) = 0x2aea31934000lseek(4,SEEK_CUR)                   = 0read(4,"root:x:0:root\nbin:x:1:root,bin,d"...,4096) = 903read(4,"",4096)                       = 0close(4)                                = 0munmap(0x2aea31934000,4096)            = 0setgroups(1,[77])                      = 0setgID(77)                              = 0setuID(77)                              = 0setsockopt(3,Sol_SOCKET,SO_ATTACH_FILTER,"
# grep 77 /etc/grouppcap:x:77:# grep 77 /etc/passwdpcap:x:77:77::/var/arpwatch:/sbin/nologin
# man tcpdump       -C     Before writing a raw packet to a savefile,check whether the file is currently larger than file_size and,if so,close the current savefile and open a new one.  Savefiles after the first savefile will have the name  specifIEd              with  the -w flag,with a number after it,starting at 1 and continuing upward.  The units of file_size are mil-              lions of bytes (1,000,000 bytes,not 1,048,576 bytes).              **Note that when used with -Z option (enabled by default),privileges are dropped before opening first savefile.**# tcpdump --helptcpdump version 3.9.4libpcap version 0.9.4Usage: tcpdump [-aAdDeflLnnopqRStuUvxX] [-c count] [ -C file_size ]                [ -E algo:secret ] [ -F file ] [ -i interface ] [ -M secret ]                [ -r file ] [ -s snaplen ] [ -T type ] [ -w file ]                [ -W filecount ] [ -y datalinktype ] [ -Z user ]                [ Expression ]
# tcpdump -i eth0 -n -w out.pcap -C 1 -Z roottcpdump: Listening on eth0,link-type EN10MB (Ethernet),capture size 96 bytes35 packets captured35 packets received by filter0 packets dropped by kernel
07k",16) = 0fcntl(3,F_GETFL) = 0x2 (flags O_RDWR)fcntl(3,F_SETFL,O_RDWR|O_NONBLOCK) = 0recvfrom(3,0x7fff9563d35f,1,32,0) = -1 EAGAIN (Resource temporarily unavailable)fcntl(3,O_RDWR) = 0setsockopt(3,"[+++][+++][+++]P73[+++][+++][+++][+++]",16) = 0open("out.pcap",O_WRONLY|O_CREAT|O_Trunc,0666) = -1 EACCES (Permission denIEd)write(2,"tcpdump: ",9tcpdump: ) = 9write(2,"out.pcap: Permission denIEd",27out.pcap: Permission denIEd) = 27write(2,"\n",1) = 1exit_group(1) = ?

你可以看到上面的strace结果,tcpdump将权限放入用户和组pcap(77).

[+++]

从tcpdump手册页,-C

[+++]

使用-Z用户指定特定用户

[+++] 总结

以上是内存溢出为你收集整理的linux – tcpdump:out.pcap:权限被拒绝全部内容,希望文章能够帮你解决linux – tcpdump:out.pcap:权限被拒绝所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

)
File: /www/wwwroot/outofmemory.cn/tmp/route_read.php, Line: 126, InsideLink()
File: /www/wwwroot/outofmemory.cn/tmp/index.inc.php, Line: 166, include(/www/wwwroot/outofmemory.cn/tmp/route_read.php)
File: /www/wwwroot/outofmemory.cn/index.php, Line: 30, include(/www/wwwroot/outofmemory.cn/tmp/index.inc.php)
Error[8]: Undefined offset: 18, File: /www/wwwroot/outofmemory.cn/tmp/plugin_ss_superseo_model_superseo.php, Line: 121
File: /www/wwwroot/outofmemory.cn/tmp/plugin_ss_superseo_model_superseo.php, Line: 473, decode(

概述[root@localhost ~]# cat /etc/issueFedora release 17 (Beefy Miracle)Kernel \r on an \m (\l)[root@localhost ~]# uname -aLinux localhost.localdomain 3.6.10-2.fc17.i686 #1 SMP Tue Dec 11 18:33:15 UTC
[root@localhost ~]# cat /etc/issueFedora release 17 (Beefy Miracle)Kernel \r on an \m (\l)[root@localhost ~]# uname -alinux localhost.localdomain 3.6.10-2.fc17.i686 #1 SMP Tue Dec 11 18:33:15 UTC 2012 i686 i686 i386 GNU/linux[root@localhost ~]# tcpdump -i p3p1 -n -w out.pcap -C 16tcpdump: out.pcap: Permission denIEd

为什么我会得到错误?

我该怎么办?

解决方法 我在Centos 5上试过,即使在tmp或root文件夹上也是如此.从tcpdump手册页中,在打开第一个savefile之前,与-Z选项(默认启用)一起使用时,将删除权限.因为您指定了“-C 1”,因为文件大小已经达到1而发生权限被拒绝,并且在创建新文件时它将引发权限被拒绝错误.所以只需指定-Z用户
# strace tcpdump -i eth0 -n -w out.pcap -C 1fstat(4,{st_mode=S_IFREG|0644,st_size=903,...}) = 0mmap(NulL,4096,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANONYMOUS,-1,0) = 0x2aea31934000lseek(4,SEEK_CUR)                   = 0read(4,"root:x:0:root\nbin:x:1:root,bin,d"...,4096) = 903read(4,"",4096)                       = 0close(4)                                = 0munmap(0x2aea31934000,4096)            = 0setgroups(1,[77])                      = 0setgID(77)                              = 0setuID(77)                              = 0setsockopt(3,Sol_SOCKET,SO_ATTACH_FILTER,"
# grep 77 /etc/grouppcap:x:77:# grep 77 /etc/passwdpcap:x:77:77::/var/arpwatch:/sbin/nologin
# man tcpdump       -C     Before writing a raw packet to a savefile,check whether the file is currently larger than file_size and,if so,close the current savefile and open a new one.  Savefiles after the first savefile will have the name  specifIEd              with  the -w flag,with a number after it,starting at 1 and continuing upward.  The units of file_size are mil-              lions of bytes (1,000,000 bytes,not 1,048,576 bytes).              **Note that when used with -Z option (enabled by default),privileges are dropped before opening first savefile.**# tcpdump --helptcpdump version 3.9.4libpcap version 0.9.4Usage: tcpdump [-aAdDeflLnnopqRStuUvxX] [-c count] [ -C file_size ]                [ -E algo:secret ] [ -F file ] [ -i interface ] [ -M secret ]                [ -r file ] [ -s snaplen ] [ -T type ] [ -w file ]                [ -W filecount ] [ -y datalinktype ] [ -Z user ]                [ Expression ]
# tcpdump -i eth0 -n -w out.pcap -C 1 -Z roottcpdump: Listening on eth0,link-type EN10MB (Ethernet),capture size 96 bytes35 packets captured35 packets received by filter0 packets dropped by kernel
07k",16) = 0fcntl(3,F_GETFL) = 0x2 (flags O_RDWR)fcntl(3,F_SETFL,O_RDWR|O_NONBLOCK) = 0recvfrom(3,0x7fff9563d35f,1,32,0) = -1 EAGAIN (Resource temporarily unavailable)fcntl(3,O_RDWR) = 0setsockopt(3,"[+++][+++]P73[+++][+++][+++][+++]",16) = 0open("out.pcap",O_WRONLY|O_CREAT|O_Trunc,0666) = -1 EACCES (Permission denIEd)write(2,"tcpdump: ",9tcpdump: ) = 9write(2,"out.pcap: Permission denIEd",27out.pcap: Permission denIEd) = 27write(2,"\n",1) = 1exit_group(1) = ?

你可以看到上面的strace结果,tcpdump将权限放入用户和组pcap(77).

[+++]

从tcpdump手册页,-C

[+++]

使用-Z用户指定特定用户

[+++] 总结

以上是内存溢出为你收集整理的linux – tcpdump:out.pcap:权限被拒绝全部内容,希望文章能够帮你解决linux – tcpdump:out.pcap:权限被拒绝所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

)
File: /www/wwwroot/outofmemory.cn/tmp/route_read.php, Line: 126, InsideLink()
File: /www/wwwroot/outofmemory.cn/tmp/index.inc.php, Line: 166, include(/www/wwwroot/outofmemory.cn/tmp/route_read.php)
File: /www/wwwroot/outofmemory.cn/index.php, Line: 30, include(/www/wwwroot/outofmemory.cn/tmp/index.inc.php)
Error[8]: Undefined offset: 19, File: /www/wwwroot/outofmemory.cn/tmp/plugin_ss_superseo_model_superseo.php, Line: 121
File: /www/wwwroot/outofmemory.cn/tmp/plugin_ss_superseo_model_superseo.php, Line: 473, decode(

概述[root@localhost ~]# cat /etc/issueFedora release 17 (Beefy Miracle)Kernel \r on an \m (\l)[root@localhost ~]# uname -aLinux localhost.localdomain 3.6.10-2.fc17.i686 #1 SMP Tue Dec 11 18:33:15 UTC
[root@localhost ~]# cat /etc/issueFedora release 17 (Beefy Miracle)Kernel \r on an \m (\l)[root@localhost ~]# uname -alinux localhost.localdomain 3.6.10-2.fc17.i686 #1 SMP Tue Dec 11 18:33:15 UTC 2012 i686 i686 i386 GNU/linux[root@localhost ~]# tcpdump -i p3p1 -n -w out.pcap -C 16tcpdump: out.pcap: Permission denIEd

为什么我会得到错误?

我该怎么办?

解决方法 我在Centos 5上试过,即使在tmp或root文件夹上也是如此.从tcpdump手册页中,在打开第一个savefile之前,与-Z选项(默认启用)一起使用时,将删除权限.因为您指定了“-C 1”,因为文件大小已经达到1而发生权限被拒绝,并且在创建新文件时它将引发权限被拒绝错误.所以只需指定-Z用户
# strace tcpdump -i eth0 -n -w out.pcap -C 1fstat(4,{st_mode=S_IFREG|0644,st_size=903,...}) = 0mmap(NulL,4096,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANONYMOUS,-1,0) = 0x2aea31934000lseek(4,SEEK_CUR)                   = 0read(4,"root:x:0:root\nbin:x:1:root,bin,d"...,4096) = 903read(4,"",4096)                       = 0close(4)                                = 0munmap(0x2aea31934000,4096)            = 0setgroups(1,[77])                      = 0setgID(77)                              = 0setuID(77)                              = 0setsockopt(3,Sol_SOCKET,SO_ATTACH_FILTER,"
# grep 77 /etc/grouppcap:x:77:# grep 77 /etc/passwdpcap:x:77:77::/var/arpwatch:/sbin/nologin
# man tcpdump       -C     Before writing a raw packet to a savefile,check whether the file is currently larger than file_size and,if so,close the current savefile and open a new one.  Savefiles after the first savefile will have the name  specifIEd              with  the -w flag,with a number after it,starting at 1 and continuing upward.  The units of file_size are mil-              lions of bytes (1,000,000 bytes,not 1,048,576 bytes).              **Note that when used with -Z option (enabled by default),privileges are dropped before opening first savefile.**# tcpdump --helptcpdump version 3.9.4libpcap version 0.9.4Usage: tcpdump [-aAdDeflLnnopqRStuUvxX] [-c count] [ -C file_size ]                [ -E algo:secret ] [ -F file ] [ -i interface ] [ -M secret ]                [ -r file ] [ -s snaplen ] [ -T type ] [ -w file ]                [ -W filecount ] [ -y datalinktype ] [ -Z user ]                [ Expression ]
# tcpdump -i eth0 -n -w out.pcap -C 1 -Z roottcpdump: Listening on eth0,link-type EN10MB (Ethernet),capture size 96 bytes35 packets captured35 packets received by filter0 packets dropped by kernel
07k",16) = 0fcntl(3,F_GETFL) = 0x2 (flags O_RDWR)fcntl(3,F_SETFL,O_RDWR|O_NONBLOCK) = 0recvfrom(3,0x7fff9563d35f,1,32,0) = -1 EAGAIN (Resource temporarily unavailable)fcntl(3,O_RDWR) = 0setsockopt(3,"[+++]P73[+++][+++][+++][+++]",16) = 0open("out.pcap",O_WRONLY|O_CREAT|O_Trunc,0666) = -1 EACCES (Permission denIEd)write(2,"tcpdump: ",9tcpdump: ) = 9write(2,"out.pcap: Permission denIEd",27out.pcap: Permission denIEd) = 27write(2,"\n",1) = 1exit_group(1) = ?

你可以看到上面的strace结果,tcpdump将权限放入用户和组pcap(77).

[+++]

从tcpdump手册页,-C

[+++]

使用-Z用户指定特定用户

[+++] 总结

以上是内存溢出为你收集整理的linux – tcpdump:out.pcap:权限被拒绝全部内容,希望文章能够帮你解决linux – tcpdump:out.pcap:权限被拒绝所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

)
File: /www/wwwroot/outofmemory.cn/tmp/route_read.php, Line: 126, InsideLink()
File: /www/wwwroot/outofmemory.cn/tmp/index.inc.php, Line: 166, include(/www/wwwroot/outofmemory.cn/tmp/route_read.php)
File: /www/wwwroot/outofmemory.cn/index.php, Line: 30, include(/www/wwwroot/outofmemory.cn/tmp/index.inc.php)
Error[8]: Undefined offset: 20, File: /www/wwwroot/outofmemory.cn/tmp/plugin_ss_superseo_model_superseo.php, Line: 121
File: /www/wwwroot/outofmemory.cn/tmp/plugin_ss_superseo_model_superseo.php, Line: 473, decode(

概述[root@localhost ~]# cat /etc/issueFedora release 17 (Beefy Miracle)Kernel \r on an \m (\l)[root@localhost ~]# uname -aLinux localhost.localdomain 3.6.10-2.fc17.i686 #1 SMP Tue Dec 11 18:33:15 UTC
[root@localhost ~]# cat /etc/issueFedora release 17 (Beefy Miracle)Kernel \r on an \m (\l)[root@localhost ~]# uname -alinux localhost.localdomain 3.6.10-2.fc17.i686 #1 SMP Tue Dec 11 18:33:15 UTC 2012 i686 i686 i386 GNU/linux[root@localhost ~]# tcpdump -i p3p1 -n -w out.pcap -C 16tcpdump: out.pcap: Permission denIEd

为什么我会得到错误?

我该怎么办?

解决方法 我在Centos 5上试过,即使在tmp或root文件夹上也是如此.从tcpdump手册页中,在打开第一个savefile之前,与-Z选项(默认启用)一起使用时,将删除权限.因为您指定了“-C 1”,因为文件大小已经达到1而发生权限被拒绝,并且在创建新文件时它将引发权限被拒绝错误.所以只需指定-Z用户
# strace tcpdump -i eth0 -n -w out.pcap -C 1fstat(4,{st_mode=S_IFREG|0644,st_size=903,...}) = 0mmap(NulL,4096,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANONYMOUS,-1,0) = 0x2aea31934000lseek(4,SEEK_CUR)                   = 0read(4,"root:x:0:root\nbin:x:1:root,bin,d"...,4096) = 903read(4,"",4096)                       = 0close(4)                                = 0munmap(0x2aea31934000,4096)            = 0setgroups(1,[77])                      = 0setgID(77)                              = 0setuID(77)                              = 0setsockopt(3,Sol_SOCKET,SO_ATTACH_FILTER,"
# grep 77 /etc/grouppcap:x:77:# grep 77 /etc/passwdpcap:x:77:77::/var/arpwatch:/sbin/nologin
# man tcpdump       -C     Before writing a raw packet to a savefile,check whether the file is currently larger than file_size and,if so,close the current savefile and open a new one.  Savefiles after the first savefile will have the name  specifIEd              with  the -w flag,with a number after it,starting at 1 and continuing upward.  The units of file_size are mil-              lions of bytes (1,000,000 bytes,not 1,048,576 bytes).              **Note that when used with -Z option (enabled by default),privileges are dropped before opening first savefile.**# tcpdump --helptcpdump version 3.9.4libpcap version 0.9.4Usage: tcpdump [-aAdDeflLnnopqRStuUvxX] [-c count] [ -C file_size ]                [ -E algo:secret ] [ -F file ] [ -i interface ] [ -M secret ]                [ -r file ] [ -s snaplen ] [ -T type ] [ -w file ]                [ -W filecount ] [ -y datalinktype ] [ -Z user ]                [ Expression ]
# tcpdump -i eth0 -n -w out.pcap -C 1 -Z roottcpdump: Listening on eth0,link-type EN10MB (Ethernet),capture size 96 bytes35 packets captured35 packets received by filter0 packets dropped by kernel
07k",16) = 0fcntl(3,F_GETFL) = 0x2 (flags O_RDWR)fcntl(3,F_SETFL,O_RDWR|O_NONBLOCK) = 0recvfrom(3,0x7fff9563d35f,1,32,0) = -1 EAGAIN (Resource temporarily unavailable)fcntl(3,O_RDWR) = 0setsockopt(3,"P73[+++][+++][+++][+++]",16) = 0open("out.pcap",O_WRONLY|O_CREAT|O_Trunc,0666) = -1 EACCES (Permission denIEd)write(2,"tcpdump: ",9tcpdump: ) = 9write(2,"out.pcap: Permission denIEd",27out.pcap: Permission denIEd) = 27write(2,"\n",1) = 1exit_group(1) = ?

你可以看到上面的strace结果,tcpdump将权限放入用户和组pcap(77).

[+++]

从tcpdump手册页,-C

[+++]

使用-Z用户指定特定用户

[+++] 总结

以上是内存溢出为你收集整理的linux – tcpdump:out.pcap:权限被拒绝全部内容,希望文章能够帮你解决linux – tcpdump:out.pcap:权限被拒绝所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

)
File: /www/wwwroot/outofmemory.cn/tmp/route_read.php, Line: 126, InsideLink()
File: /www/wwwroot/outofmemory.cn/tmp/index.inc.php, Line: 166, include(/www/wwwroot/outofmemory.cn/tmp/route_read.php)
File: /www/wwwroot/outofmemory.cn/index.php, Line: 30, include(/www/wwwroot/outofmemory.cn/tmp/index.inc.php)
Error[8]: Undefined offset: 21, File: /www/wwwroot/outofmemory.cn/tmp/plugin_ss_superseo_model_superseo.php, Line: 121
File: /www/wwwroot/outofmemory.cn/tmp/plugin_ss_superseo_model_superseo.php, Line: 473, decode(

概述[root@localhost ~]# cat /etc/issueFedora release 17 (Beefy Miracle)Kernel \r on an \m (\l)[root@localhost ~]# uname -aLinux localhost.localdomain 3.6.10-2.fc17.i686 #1 SMP Tue Dec 11 18:33:15 UTC
[root@localhost ~]# cat /etc/issueFedora release 17 (Beefy Miracle)Kernel \r on an \m (\l)[root@localhost ~]# uname -alinux localhost.localdomain 3.6.10-2.fc17.i686 #1 SMP Tue Dec 11 18:33:15 UTC 2012 i686 i686 i386 GNU/linux[root@localhost ~]# tcpdump -i p3p1 -n -w out.pcap -C 16tcpdump: out.pcap: Permission denIEd

为什么我会得到错误?

我该怎么办?

解决方法 我在Centos 5上试过,即使在tmp或root文件夹上也是如此.从tcpdump手册页中,在打开第一个savefile之前,与-Z选项(默认启用)一起使用时,将删除权限.因为您指定了“-C 1”,因为文件大小已经达到1而发生权限被拒绝,并且在创建新文件时它将引发权限被拒绝错误.所以只需指定-Z用户
# strace tcpdump -i eth0 -n -w out.pcap -C 1fstat(4,{st_mode=S_IFREG|0644,st_size=903,...}) = 0mmap(NulL,4096,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANONYMOUS,-1,0) = 0x2aea31934000lseek(4,SEEK_CUR)                   = 0read(4,"root:x:0:root\nbin:x:1:root,bin,d"...,4096) = 903read(4,"",4096)                       = 0close(4)                                = 0munmap(0x2aea31934000,4096)            = 0setgroups(1,[77])                      = 0setgID(77)                              = 0setuID(77)                              = 0setsockopt(3,Sol_SOCKET,SO_ATTACH_FILTER,"
# grep 77 /etc/grouppcap:x:77:# grep 77 /etc/passwdpcap:x:77:77::/var/arpwatch:/sbin/nologin
# man tcpdump       -C     Before writing a raw packet to a savefile,check whether the file is currently larger than file_size and,if so,close the current savefile and open a new one.  Savefiles after the first savefile will have the name  specifIEd              with  the -w flag,with a number after it,starting at 1 and continuing upward.  The units of file_size are mil-              lions of bytes (1,000,000 bytes,not 1,048,576 bytes).              **Note that when used with -Z option (enabled by default),privileges are dropped before opening first savefile.**# tcpdump --helptcpdump version 3.9.4libpcap version 0.9.4Usage: tcpdump [-aAdDeflLnnopqRStuUvxX] [-c count] [ -C file_size ]                [ -E algo:secret ] [ -F file ] [ -i interface ] [ -M secret ]                [ -r file ] [ -s snaplen ] [ -T type ] [ -w file ]                [ -W filecount ] [ -y datalinktype ] [ -Z user ]                [ Expression ]
# tcpdump -i eth0 -n -w out.pcap -C 1 -Z roottcpdump: Listening on eth0,link-type EN10MB (Ethernet),capture size 96 bytes35 packets captured35 packets received by filter0 packets dropped by kernel
07k",16) = 0fcntl(3,F_GETFL) = 0x2 (flags O_RDWR)fcntl(3,F_SETFL,O_RDWR|O_NONBLOCK) = 0recvfrom(3,0x7fff9563d35f,1,32,0) = -1 EAGAIN (Resource temporarily unavailable)fcntl(3,O_RDWR) = 0setsockopt(3,"P73[+++][+++][+++]",16) = 0open("out.pcap",O_WRONLY|O_CREAT|O_Trunc,0666) = -1 EACCES (Permission denIEd)write(2,"tcpdump: ",9tcpdump: ) = 9write(2,"out.pcap: Permission denIEd",27out.pcap: Permission denIEd) = 27write(2,"\n",1) = 1exit_group(1) = ?

你可以看到上面的strace结果,tcpdump将权限放入用户和组pcap(77).

[+++]

从tcpdump手册页,-C

[+++]

使用-Z用户指定特定用户

[+++] 总结

以上是内存溢出为你收集整理的linux – tcpdump:out.pcap:权限被拒绝全部内容,希望文章能够帮你解决linux – tcpdump:out.pcap:权限被拒绝所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

)
File: /www/wwwroot/outofmemory.cn/tmp/route_read.php, Line: 126, InsideLink()
File: /www/wwwroot/outofmemory.cn/tmp/index.inc.php, Line: 166, include(/www/wwwroot/outofmemory.cn/tmp/route_read.php)
File: /www/wwwroot/outofmemory.cn/index.php, Line: 30, include(/www/wwwroot/outofmemory.cn/tmp/index.inc.php)
Error[8]: Undefined offset: 22, File: /www/wwwroot/outofmemory.cn/tmp/plugin_ss_superseo_model_superseo.php, Line: 121
File: /www/wwwroot/outofmemory.cn/tmp/plugin_ss_superseo_model_superseo.php, Line: 473, decode(

概述[root@localhost ~]# cat /etc/issueFedora release 17 (Beefy Miracle)Kernel \r on an \m (\l)[root@localhost ~]# uname -aLinux localhost.localdomain 3.6.10-2.fc17.i686 #1 SMP Tue Dec 11 18:33:15 UTC
[root@localhost ~]# cat /etc/issueFedora release 17 (Beefy Miracle)Kernel \r on an \m (\l)[root@localhost ~]# uname -alinux localhost.localdomain 3.6.10-2.fc17.i686 #1 SMP Tue Dec 11 18:33:15 UTC 2012 i686 i686 i386 GNU/linux[root@localhost ~]# tcpdump -i p3p1 -n -w out.pcap -C 16tcpdump: out.pcap: Permission denIEd

为什么我会得到错误?

我该怎么办?

解决方法 我在Centos 5上试过,即使在tmp或root文件夹上也是如此.从tcpdump手册页中,在打开第一个savefile之前,与-Z选项(默认启用)一起使用时,将删除权限.因为您指定了“-C 1”,因为文件大小已经达到1而发生权限被拒绝,并且在创建新文件时它将引发权限被拒绝错误.所以只需指定-Z用户
# strace tcpdump -i eth0 -n -w out.pcap -C 1fstat(4,{st_mode=S_IFREG|0644,st_size=903,...}) = 0mmap(NulL,4096,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANONYMOUS,-1,0) = 0x2aea31934000lseek(4,SEEK_CUR)                   = 0read(4,"root:x:0:root\nbin:x:1:root,bin,d"...,4096) = 903read(4,"",4096)                       = 0close(4)                                = 0munmap(0x2aea31934000,4096)            = 0setgroups(1,[77])                      = 0setgID(77)                              = 0setuID(77)                              = 0setsockopt(3,Sol_SOCKET,SO_ATTACH_FILTER,"
# grep 77 /etc/grouppcap:x:77:# grep 77 /etc/passwdpcap:x:77:77::/var/arpwatch:/sbin/nologin
# man tcpdump       -C     Before writing a raw packet to a savefile,check whether the file is currently larger than file_size and,if so,close the current savefile and open a new one.  Savefiles after the first savefile will have the name  specifIEd              with  the -w flag,with a number after it,starting at 1 and continuing upward.  The units of file_size are mil-              lions of bytes (1,000,000 bytes,not 1,048,576 bytes).              **Note that when used with -Z option (enabled by default),privileges are dropped before opening first savefile.**# tcpdump --helptcpdump version 3.9.4libpcap version 0.9.4Usage: tcpdump [-aAdDeflLnnopqRStuUvxX] [-c count] [ -C file_size ]                [ -E algo:secret ] [ -F file ] [ -i interface ] [ -M secret ]                [ -r file ] [ -s snaplen ] [ -T type ] [ -w file ]                [ -W filecount ] [ -y datalinktype ] [ -Z user ]                [ Expression ]
# tcpdump -i eth0 -n -w out.pcap -C 1 -Z roottcpdump: Listening on eth0,link-type EN10MB (Ethernet),capture size 96 bytes35 packets captured35 packets received by filter0 packets dropped by kernel
07k",16) = 0fcntl(3,F_GETFL) = 0x2 (flags O_RDWR)fcntl(3,F_SETFL,O_RDWR|O_NONBLOCK) = 0recvfrom(3,0x7fff9563d35f,1,32,0) = -1 EAGAIN (Resource temporarily unavailable)fcntl(3,O_RDWR) = 0setsockopt(3,"P73[+++][+++]",16) = 0open("out.pcap",O_WRONLY|O_CREAT|O_Trunc,0666) = -1 EACCES (Permission denIEd)write(2,"tcpdump: ",9tcpdump: ) = 9write(2,"out.pcap: Permission denIEd",27out.pcap: Permission denIEd) = 27write(2,"\n",1) = 1exit_group(1) = ?

你可以看到上面的strace结果,tcpdump将权限放入用户和组pcap(77).

[+++]

从tcpdump手册页,-C

[+++]

使用-Z用户指定特定用户

[+++] 总结

以上是内存溢出为你收集整理的linux – tcpdump:out.pcap:权限被拒绝全部内容,希望文章能够帮你解决linux – tcpdump:out.pcap:权限被拒绝所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

)
File: /www/wwwroot/outofmemory.cn/tmp/route_read.php, Line: 126, InsideLink()
File: /www/wwwroot/outofmemory.cn/tmp/index.inc.php, Line: 166, include(/www/wwwroot/outofmemory.cn/tmp/route_read.php)
File: /www/wwwroot/outofmemory.cn/index.php, Line: 30, include(/www/wwwroot/outofmemory.cn/tmp/index.inc.php)
Error[8]: Undefined offset: 23, File: /www/wwwroot/outofmemory.cn/tmp/plugin_ss_superseo_model_superseo.php, Line: 121
File: /www/wwwroot/outofmemory.cn/tmp/plugin_ss_superseo_model_superseo.php, Line: 473, decode(

概述[root@localhost ~]# cat /etc/issueFedora release 17 (Beefy Miracle)Kernel \r on an \m (\l)[root@localhost ~]# uname -aLinux localhost.localdomain 3.6.10-2.fc17.i686 #1 SMP Tue Dec 11 18:33:15 UTC
[root@localhost ~]# cat /etc/issueFedora release 17 (Beefy Miracle)Kernel \r on an \m (\l)[root@localhost ~]# uname -alinux localhost.localdomain 3.6.10-2.fc17.i686 #1 SMP Tue Dec 11 18:33:15 UTC 2012 i686 i686 i386 GNU/linux[root@localhost ~]# tcpdump -i p3p1 -n -w out.pcap -C 16tcpdump: out.pcap: Permission denIEd

为什么我会得到错误?

我该怎么办?

解决方法 我在Centos 5上试过,即使在tmp或root文件夹上也是如此.从tcpdump手册页中,在打开第一个savefile之前,与-Z选项(默认启用)一起使用时,将删除权限.因为您指定了“-C 1”,因为文件大小已经达到1而发生权限被拒绝,并且在创建新文件时它将引发权限被拒绝错误.所以只需指定-Z用户
# strace tcpdump -i eth0 -n -w out.pcap -C 1fstat(4,{st_mode=S_IFREG|0644,st_size=903,...}) = 0mmap(NulL,4096,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANONYMOUS,-1,0) = 0x2aea31934000lseek(4,SEEK_CUR)                   = 0read(4,"root:x:0:root\nbin:x:1:root,bin,d"...,4096) = 903read(4,"",4096)                       = 0close(4)                                = 0munmap(0x2aea31934000,4096)            = 0setgroups(1,[77])                      = 0setgID(77)                              = 0setuID(77)                              = 0setsockopt(3,Sol_SOCKET,SO_ATTACH_FILTER,"
# grep 77 /etc/grouppcap:x:77:# grep 77 /etc/passwdpcap:x:77:77::/var/arpwatch:/sbin/nologin
# man tcpdump       -C     Before writing a raw packet to a savefile,check whether the file is currently larger than file_size and,if so,close the current savefile and open a new one.  Savefiles after the first savefile will have the name  specifIEd              with  the -w flag,with a number after it,starting at 1 and continuing upward.  The units of file_size are mil-              lions of bytes (1,000,000 bytes,not 1,048,576 bytes).              **Note that when used with -Z option (enabled by default),privileges are dropped before opening first savefile.**# tcpdump --helptcpdump version 3.9.4libpcap version 0.9.4Usage: tcpdump [-aAdDeflLnnopqRStuUvxX] [-c count] [ -C file_size ]                [ -E algo:secret ] [ -F file ] [ -i interface ] [ -M secret ]                [ -r file ] [ -s snaplen ] [ -T type ] [ -w file ]                [ -W filecount ] [ -y datalinktype ] [ -Z user ]                [ Expression ]
# tcpdump -i eth0 -n -w out.pcap -C 1 -Z roottcpdump: Listening on eth0,link-type EN10MB (Ethernet),capture size 96 bytes35 packets captured35 packets received by filter0 packets dropped by kernel
07k",16) = 0fcntl(3,F_GETFL) = 0x2 (flags O_RDWR)fcntl(3,F_SETFL,O_RDWR|O_NONBLOCK) = 0recvfrom(3,0x7fff9563d35f,1,32,0) = -1 EAGAIN (Resource temporarily unavailable)fcntl(3,O_RDWR) = 0setsockopt(3,"P73[+++]",16) = 0open("out.pcap",O_WRONLY|O_CREAT|O_Trunc,0666) = -1 EACCES (Permission denIEd)write(2,"tcpdump: ",9tcpdump: ) = 9write(2,"out.pcap: Permission denIEd",27out.pcap: Permission denIEd) = 27write(2,"\n",1) = 1exit_group(1) = ?

你可以看到上面的strace结果,tcpdump将权限放入用户和组pcap(77).

[+++]

从tcpdump手册页,-C

[+++]

使用-Z用户指定特定用户

[+++] 总结

以上是内存溢出为你收集整理的linux – tcpdump:out.pcap:权限被拒绝全部内容,希望文章能够帮你解决linux – tcpdump:out.pcap:权限被拒绝所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

)
File: /www/wwwroot/outofmemory.cn/tmp/route_read.php, Line: 126, InsideLink()
File: /www/wwwroot/outofmemory.cn/tmp/index.inc.php, Line: 166, include(/www/wwwroot/outofmemory.cn/tmp/route_read.php)
File: /www/wwwroot/outofmemory.cn/index.php, Line: 30, include(/www/wwwroot/outofmemory.cn/tmp/index.inc.php)
Error[8]: Undefined offset: 24, File: /www/wwwroot/outofmemory.cn/tmp/plugin_ss_superseo_model_superseo.php, Line: 121
File: /www/wwwroot/outofmemory.cn/tmp/plugin_ss_superseo_model_superseo.php, Line: 473, decode(

概述[root@localhost ~]# cat /etc/issueFedora release 17 (Beefy Miracle)Kernel \r on an \m (\l)[root@localhost ~]# uname -aLinux localhost.localdomain 3.6.10-2.fc17.i686 #1 SMP Tue Dec 11 18:33:15 UTC
[root@localhost ~]# cat /etc/issueFedora release 17 (Beefy Miracle)Kernel \r on an \m (\l)[root@localhost ~]# uname -alinux localhost.localdomain 3.6.10-2.fc17.i686 #1 SMP Tue Dec 11 18:33:15 UTC 2012 i686 i686 i386 GNU/linux[root@localhost ~]# tcpdump -i p3p1 -n -w out.pcap -C 16tcpdump: out.pcap: Permission denIEd

为什么我会得到错误?

我该怎么办?

解决方法 我在Centos 5上试过,即使在tmp或root文件夹上也是如此.从tcpdump手册页中,在打开第一个savefile之前,与-Z选项(默认启用)一起使用时,将删除权限.因为您指定了“-C 1”,因为文件大小已经达到1而发生权限被拒绝,并且在创建新文件时它将引发权限被拒绝错误.所以只需指定-Z用户
# strace tcpdump -i eth0 -n -w out.pcap -C 1fstat(4,{st_mode=S_IFREG|0644,st_size=903,...}) = 0mmap(NulL,4096,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANONYMOUS,-1,0) = 0x2aea31934000lseek(4,SEEK_CUR)                   = 0read(4,"root:x:0:root\nbin:x:1:root,bin,d"...,4096) = 903read(4,"",4096)                       = 0close(4)                                = 0munmap(0x2aea31934000,4096)            = 0setgroups(1,[77])                      = 0setgID(77)                              = 0setuID(77)                              = 0setsockopt(3,Sol_SOCKET,SO_ATTACH_FILTER,"
# grep 77 /etc/grouppcap:x:77:# grep 77 /etc/passwdpcap:x:77:77::/var/arpwatch:/sbin/nologin
# man tcpdump       -C     Before writing a raw packet to a savefile,check whether the file is currently larger than file_size and,if so,close the current savefile and open a new one.  Savefiles after the first savefile will have the name  specifIEd              with  the -w flag,with a number after it,starting at 1 and continuing upward.  The units of file_size are mil-              lions of bytes (1,000,000 bytes,not 1,048,576 bytes).              **Note that when used with -Z option (enabled by default),privileges are dropped before opening first savefile.**# tcpdump --helptcpdump version 3.9.4libpcap version 0.9.4Usage: tcpdump [-aAdDeflLnnopqRStuUvxX] [-c count] [ -C file_size ]                [ -E algo:secret ] [ -F file ] [ -i interface ] [ -M secret ]                [ -r file ] [ -s snaplen ] [ -T type ] [ -w file ]                [ -W filecount ] [ -y datalinktype ] [ -Z user ]                [ Expression ]
# tcpdump -i eth0 -n -w out.pcap -C 1 -Z roottcpdump: Listening on eth0,link-type EN10MB (Ethernet),capture size 96 bytes35 packets captured35 packets received by filter0 packets dropped by kernel
07k",16) = 0fcntl(3,F_GETFL) = 0x2 (flags O_RDWR)fcntl(3,F_SETFL,O_RDWR|O_NONBLOCK) = 0recvfrom(3,0x7fff9563d35f,1,32,0) = -1 EAGAIN (Resource temporarily unavailable)fcntl(3,O_RDWR) = 0setsockopt(3,"P73",16) = 0open("out.pcap",O_WRONLY|O_CREAT|O_Trunc,0666) = -1 EACCES (Permission denIEd)write(2,"tcpdump: ",9tcpdump: ) = 9write(2,"out.pcap: Permission denIEd",27out.pcap: Permission denIEd) = 27write(2,"\n",1) = 1exit_group(1) = ?

你可以看到上面的strace结果,tcpdump将权限放入用户和组pcap(77).

[+++]

从tcpdump手册页,-C

[+++]

使用-Z用户指定特定用户

[+++] 总结

以上是内存溢出为你收集整理的linux – tcpdump:out.pcap:权限被拒绝全部内容,希望文章能够帮你解决linux – tcpdump:out.pcap:权限被拒绝所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

)
File: /www/wwwroot/outofmemory.cn/tmp/route_read.php, Line: 126, InsideLink()
File: /www/wwwroot/outofmemory.cn/tmp/index.inc.php, Line: 166, include(/www/wwwroot/outofmemory.cn/tmp/route_read.php)
File: /www/wwwroot/outofmemory.cn/index.php, Line: 30, include(/www/wwwroot/outofmemory.cn/tmp/index.inc.php)
Error[8]: Undefined offset: 25, File: /www/wwwroot/outofmemory.cn/tmp/plugin_ss_superseo_model_superseo.php, Line: 121
File: /www/wwwroot/outofmemory.cn/tmp/plugin_ss_superseo_model_superseo.php, Line: 473, decode(

概述[root@localhost ~]# cat /etc/issueFedora release 17 (Beefy Miracle)Kernel \r on an \m (\l)[root@localhost ~]# uname -aLinux localhost.localdomain 3.6.10-2.fc17.i686 #1 SMP Tue Dec 11 18:33:15 UTC
[root@localhost ~]# cat /etc/issueFedora release 17 (Beefy Miracle)Kernel \r on an \m (\l)[root@localhost ~]# uname -alinux localhost.localdomain 3.6.10-2.fc17.i686 #1 SMP Tue Dec 11 18:33:15 UTC 2012 i686 i686 i386 GNU/linux[root@localhost ~]# tcpdump -i p3p1 -n -w out.pcap -C 16tcpdump: out.pcap: Permission denIEd

为什么我会得到错误?

我该怎么办?

解决方法 我在Centos 5上试过,即使在tmp或root文件夹上也是如此.从tcpdump手册页中,在打开第一个savefile之前,与-Z选项(默认启用)一起使用时,将删除权限.因为您指定了“-C 1”,因为文件大小已经达到1而发生权限被拒绝,并且在创建新文件时它将引发权限被拒绝错误.所以只需指定-Z用户
# strace tcpdump -i eth0 -n -w out.pcap -C 1fstat(4,{st_mode=S_IFREG|0644,st_size=903,...}) = 0mmap(NulL,4096,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANONYMOUS,-1,0) = 0x2aea31934000lseek(4,SEEK_CUR)                   = 0read(4,"root:x:0:root\nbin:x:1:root,bin,d"...,4096) = 903read(4,"",4096)                       = 0close(4)                                = 0munmap(0x2aea31934000,4096)            = 0setgroups(1,[77])                      = 0setgID(77)                              = 0setuID(77)                              = 0setsockopt(3,Sol_SOCKET,SO_ATTACH_FILTER,"
# grep 77 /etc/grouppcap:x:77:# grep 77 /etc/passwdpcap:x:77:77::/var/arpwatch:/sbin/nologin
# man tcpdump       -C     Before writing a raw packet to a savefile,check whether the file is currently larger than file_size and,if so,close the current savefile and open a new one.  Savefiles after the first savefile will have the name  specifIEd              with  the -w flag,with a number after it,starting at 1 and continuing upward.  The units of file_size are mil-              lions of bytes (1,000,000 bytes,not 1,048,576 bytes).              **Note that when used with -Z option (enabled by default),privileges are dropped before opening first savefile.**# tcpdump --helptcpdump version 3.9.4libpcap version 0.9.4Usage: tcpdump [-aAdDeflLnnopqRStuUvxX] [-c count] [ -C file_size ]                [ -E algo:secret ] [ -F file ] [ -i interface ] [ -M secret ]                [ -r file ] [ -s snaplen ] [ -T type ] [ -w file ]                [ -W filecount ] [ -y datalinktype ] [ -Z user ]                [ Expression ]
# tcpdump -i eth0 -n -w out.pcap -C 1 -Z roottcpdump: Listening on eth0,link-type EN10MB (Ethernet),capture size 96 bytes35 packets captured35 packets received by filter0 packets dropped by kernel
07k",16) = 0fcntl(3,F_GETFL) = 0x2 (flags O_RDWR)fcntl(3,F_SETFL,O_RDWR|O_NONBLOCK) = 0recvfrom(3,0x7fff9563d35f,1,32,0) = -1 EAGAIN (Resource temporarily unavailable)fcntl(3,O_RDWR) = 0setsockopt(3,"P73",16) = 0open("out.pcap",O_WRONLY|O_CREAT|O_Trunc,0666) = -1 EACCES (Permission denIEd)write(2,"tcpdump: ",9tcpdump: ) = 9write(2,"out.pcap: Permission denIEd",27out.pcap: Permission denIEd) = 27write(2,"\n",1) = 1exit_group(1) = ?

你可以看到上面的strace结果,tcpdump将权限放入用户和组pcap(77).

从tcpdump手册页,-C

[+++]

使用-Z用户指定特定用户

[+++] 总结

以上是内存溢出为你收集整理的linux – tcpdump:out.pcap:权限被拒绝全部内容,希望文章能够帮你解决linux – tcpdump:out.pcap:权限被拒绝所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

)
File: /www/wwwroot/outofmemory.cn/tmp/route_read.php, Line: 126, InsideLink()
File: /www/wwwroot/outofmemory.cn/tmp/index.inc.php, Line: 166, include(/www/wwwroot/outofmemory.cn/tmp/route_read.php)
File: /www/wwwroot/outofmemory.cn/index.php, Line: 30, include(/www/wwwroot/outofmemory.cn/tmp/index.inc.php)
Error[8]: Undefined offset: 26, File: /www/wwwroot/outofmemory.cn/tmp/plugin_ss_superseo_model_superseo.php, Line: 121
File: /www/wwwroot/outofmemory.cn/tmp/plugin_ss_superseo_model_superseo.php, Line: 473, decode(

概述[root@localhost ~]# cat /etc/issueFedora release 17 (Beefy Miracle)Kernel \r on an \m (\l)[root@localhost ~]# uname -aLinux localhost.localdomain 3.6.10-2.fc17.i686 #1 SMP Tue Dec 11 18:33:15 UTC
[root@localhost ~]# cat /etc/issueFedora release 17 (Beefy Miracle)Kernel \r on an \m (\l)[root@localhost ~]# uname -alinux localhost.localdomain 3.6.10-2.fc17.i686 #1 SMP Tue Dec 11 18:33:15 UTC 2012 i686 i686 i386 GNU/linux[root@localhost ~]# tcpdump -i p3p1 -n -w out.pcap -C 16tcpdump: out.pcap: Permission denIEd

为什么我会得到错误?

我该怎么办?

解决方法 我在Centos 5上试过,即使在tmp或root文件夹上也是如此.从tcpdump手册页中,在打开第一个savefile之前,与-Z选项(默认启用)一起使用时,将删除权限.因为您指定了“-C 1”,因为文件大小已经达到1而发生权限被拒绝,并且在创建新文件时它将引发权限被拒绝错误.所以只需指定-Z用户
# strace tcpdump -i eth0 -n -w out.pcap -C 1fstat(4,{st_mode=S_IFREG|0644,st_size=903,...}) = 0mmap(NulL,4096,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANONYMOUS,-1,0) = 0x2aea31934000lseek(4,SEEK_CUR)                   = 0read(4,"root:x:0:root\nbin:x:1:root,bin,d"...,4096) = 903read(4,"",4096)                       = 0close(4)                                = 0munmap(0x2aea31934000,4096)            = 0setgroups(1,[77])                      = 0setgID(77)                              = 0setuID(77)                              = 0setsockopt(3,Sol_SOCKET,SO_ATTACH_FILTER,"
# grep 77 /etc/grouppcap:x:77:# grep 77 /etc/passwdpcap:x:77:77::/var/arpwatch:/sbin/nologin
# man tcpdump       -C     Before writing a raw packet to a savefile,check whether the file is currently larger than file_size and,if so,close the current savefile and open a new one.  Savefiles after the first savefile will have the name  specifIEd              with  the -w flag,with a number after it,starting at 1 and continuing upward.  The units of file_size are mil-              lions of bytes (1,000,000 bytes,not 1,048,576 bytes).              **Note that when used with -Z option (enabled by default),privileges are dropped before opening first savefile.**# tcpdump --helptcpdump version 3.9.4libpcap version 0.9.4Usage: tcpdump [-aAdDeflLnnopqRStuUvxX] [-c count] [ -C file_size ]                [ -E algo:secret ] [ -F file ] [ -i interface ] [ -M secret ]                [ -r file ] [ -s snaplen ] [ -T type ] [ -w file ]                [ -W filecount ] [ -y datalinktype ] [ -Z user ]                [ Expression ]
# tcpdump -i eth0 -n -w out.pcap -C 1 -Z roottcpdump: Listening on eth0,link-type EN10MB (Ethernet),capture size 96 bytes35 packets captured35 packets received by filter0 packets dropped by kernel
07k",16) = 0fcntl(3,F_GETFL) = 0x2 (flags O_RDWR)fcntl(3,F_SETFL,O_RDWR|O_NONBLOCK) = 0recvfrom(3,0x7fff9563d35f,1,32,0) = -1 EAGAIN (Resource temporarily unavailable)fcntl(3,O_RDWR) = 0setsockopt(3,"P73",16) = 0open("out.pcap",O_WRONLY|O_CREAT|O_Trunc,0666) = -1 EACCES (Permission denIEd)write(2,"tcpdump: ",9tcpdump: ) = 9write(2,"out.pcap: Permission denIEd",27out.pcap: Permission denIEd) = 27write(2,"\n",1) = 1exit_group(1) = ?

你可以看到上面的strace结果,tcpdump将权限放入用户和组pcap(77).

从tcpdump手册页,-C

使用-Z用户指定特定用户

[+++] 总结

以上是内存溢出为你收集整理的linux – tcpdump:out.pcap:权限被拒绝全部内容,希望文章能够帮你解决linux – tcpdump:out.pcap:权限被拒绝所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

)
File: /www/wwwroot/outofmemory.cn/tmp/route_read.php, Line: 126, InsideLink()
File: /www/wwwroot/outofmemory.cn/tmp/index.inc.php, Line: 166, include(/www/wwwroot/outofmemory.cn/tmp/route_read.php)
File: /www/wwwroot/outofmemory.cn/index.php, Line: 30, include(/www/wwwroot/outofmemory.cn/tmp/index.inc.php)
linux – tcpdump:out.pcap:权限被拒绝_系统运维_内存溢出

linux – tcpdump:out.pcap:权限被拒绝

linux – tcpdump:out.pcap:权限被拒绝,第1张

概述[root@localhost ~]# cat /etc/issueFedora release 17 (Beefy Miracle)Kernel \r on an \m (\l)[root@localhost ~]# uname -aLinux localhost.localdomain 3.6.10-2.fc17.i686 #1 SMP Tue Dec 11 18:33:15 UTC
[root@localhost ~]# cat /etc/issueFedora release 17 (Beefy Miracle)Kernel \r on an \m (\l)[root@localhost ~]# uname -alinux localhost.localdomain 3.6.10-2.fc17.i686 #1 SMP Tue Dec 11 18:33:15 UTC 2012 i686 i686 i386 GNU/linux[root@localhost ~]# tcpdump -i p3p1 -n -w out.pcap -C 16tcpdump: out.pcap: Permission denIEd

为什么我会得到错误?

我该怎么办?

解决方法 我在Centos 5上试过,即使在tmp或root文件夹上也是如此.从tcpdump手册页中,在打开第一个savefile之前,与-Z选项(默认启用)一起使用时,将删除权限.因为您指定了“-C 1”,因为文件大小已经达到1而发生权限被拒绝,并且在创建新文件时它将引发权限被拒绝错误.所以只需指定-Z用户
# strace tcpdump -i eth0 -n -w out.pcap -C 1fstat(4,{st_mode=S_IFREG|0644,st_size=903,...}) = 0mmap(NulL,4096,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANONYMOUS,-1,0) = 0x2aea31934000lseek(4,SEEK_CUR)                   = 0read(4,"root:x:0:root\nbin:x:1:root,bin,d"...,4096) = 903read(4,"",4096)                       = 0close(4)                                = 0munmap(0x2aea31934000,4096)            = 0setgroups(1,[77])                      = 0setgID(77)                              = 0setuID(77)                              = 0setsockopt(3,Sol_SOCKET,SO_ATTACH_FILTER,"
# grep 77 /etc/grouppcap:x:77:# grep 77 /etc/passwdpcap:x:77:77::/var/arpwatch:/sbin/nologin
# man tcpdump       -C     Before writing a raw packet to a savefile,check whether the file is currently larger than file_size and,if so,close the current savefile and open a new one.  Savefiles after the first savefile will have the name  specifIEd              with  the -w flag,with a number after it,starting at 1 and continuing upward.  The units of file_size are mil-              lions of bytes (1,000,000 bytes,not 1,048,576 bytes).              **Note that when used with -Z option (enabled by default),privileges are dropped before opening first savefile.**# tcpdump --helptcpdump version 3.9.4libpcap version 0.9.4Usage: tcpdump [-aAdDeflLnnopqRStuUvxX] [-c count] [ -C file_size ]                [ -E algo:secret ] [ -F file ] [ -i interface ] [ -M secret ]                [ -r file ] [ -s snaplen ] [ -T type ] [ -w file ]                [ -W filecount ] [ -y datalinktype ] [ -Z user ]                [ Expression ]
# tcpdump -i eth0 -n -w out.pcap -C 1 -Z roottcpdump: Listening on eth0,link-type EN10MB (Ethernet),capture size 96 bytes35 packets captured35 packets received by filter0 packets dropped by kernel
07k",16) = 0fcntl(3,F_GETFL) = 0x2 (flags O_RDWR)fcntl(3,F_SETFL,O_RDWR|O_NONBLOCK) = 0recvfrom(3,0x7fff9563d35f,1,32,0) = -1 EAGAIN (Resource temporarily unavailable)fcntl(3,O_RDWR) = 0setsockopt(3,"P73",16) = 0open("out.pcap",O_WRONLY|O_CREAT|O_Trunc,0666) = -1 EACCES (Permission denIEd)write(2,"tcpdump: ",9tcpdump: ) = 9write(2,"out.pcap: Permission denIEd",27out.pcap: Permission denIEd) = 27write(2,"\n",1) = 1exit_group(1) = ?

你可以看到上面的strace结果,tcpdump将权限放入用户和组pcap(77).

从tcpdump手册页,-C

使用-Z用户指定特定用户

总结

以上是内存溢出为你收集整理的linux – tcpdump:out.pcap:权限被拒绝全部内容,希望文章能够帮你解决linux – tcpdump:out.pcap:权限被拒绝所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/yw/1045264.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-24
下一篇 2022-05-24

发表评论

登录后才能评论

评论列表(0条)

保存