LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Try to use tcpdump to read TEST file, but get permission denied. (https://www.linuxquestions.org/questions/linux-newbie-8/try-to-use-tcpdump-to-read-test-file-but-get-permission-denied-839629/)

zetareticular 10-21-2010 04:36 PM

Try to use tcpdump to read TEST file, but get permission denied.
 
Trying to use tcpdump -r TEST, and get permission denied, even though I am logged in as root or super user.
Tried using the "chmod a+rw TEST" (any other file for that matters, yes it came from another source) and get permission denied.

rigor 10-21-2010 10:06 PM

I'd expect you checked for this, but I have to ask.
The permissions on the file as shown as being accessible
by root, the file system the file is on is not mounted read-only
or NFS mounted, right?

What output do you get if you issue these commands:

Code:

ls -l TEST
and

Code:

mount -v

jdkaye 10-22-2010 12:12 AM

Maybe I've misunderstood your question. On my system at least (Debian Squeeze), tcpdump is not an executable. You can see this below.
Code:

ls -l /etc/bash_completion.d/tcpdump
-rw-r--r-- 1 root root 683 giu 20 10:00 /etc/bash_completion.d/tcpdump

cheers,
jdk

zetareticular 10-23-2010 11:09 AM

ls -l TEST
rwxr-xr-x 1 jch jch 600 2006-05-28 12:27 TEST

mount -v
/dev/sda6 on / type ext4 (rw,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
none on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
none on /dev type devtmpfs (rw,mode=0755)
none on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
none on /dev/shm type tmpfs (rw,nosuid,nodev)
none on /var/run type tmpfs (rw,nosuid,mode=0755)
none on /var/lock type tmpfs (rw,noexec,nosuid,nodev)
none on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
gvfs-fuse-daemon on /home/jch/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=jch)

zetareticular 10-23-2010 11:13 AM

Okay, after running your commands, it works now! Maybe after running mount -v (???)

Go figure???


All times are GMT -5. The time now is 04:33 AM.