LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 06-22-2008, 07:46 PM   #1
kr0m3
LQ Newbie
 
Registered: Feb 2006
Location: 010101010101001101000001
Distribution: slackware
Posts: 7

Rep: Reputation: 0
Question tshark gives "permission denied" writing to (any) file in home dir.


greetz~

first, the proper introduction:
Ubuntu Hardy Heron system
with the following tshark install:

Code:
user@host:~/Forensics$ tshark -vv
TShark 1.0.0

...<snip> ...

Compiled with GLib 2.16.1, with libpcap 0.9.8, with libz 1.2.3.3, with POSIX
capabilities (Linux), with libpcre 7.4, without SMI, with ADNS, with Lua 5.1,
with GnuTLS 2.0.4, with Gcrypt 1.2.4, with MIT Kerberos.

Running on Linux 2.6.24-19-generic, with libpcap version 0.9.8.

Built using gcc 4.2.3 (Ubuntu 4.2.3-2ubuntu7).
ok, now then;

Code:
user@hostname:~/Forensics$ sudo tshark -n -i wlan0 -s 1514 -w capfile.lpc
gives...

Code:
Running as user "root" and group "root". This could be dangerous.
Capturing on wlan0
tshark: The file to which the capture would be saved ("/home/user/capfile.lpc") could not be opened: Permission denied.
and even this;

Code:
user@hostname:~# sudo -i
root@hostname:~# tshark -n -i wlan0 -s 1514 -w /home/user/~Forensics/capfile.lpc
gives same.

however, if I specify file outside of my homedir, it functions correctly as either root or with 'sudo'

Code:
root@hostname:~# mount
/dev/sda1 on / type ext3 (rw,relatime,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
/sys on /sys type sysfs (rw,noexec,nosuid,nodev)
varrun on /var/run type tmpfs (rw,noexec,nosuid,nodev,mode=0755)
varlock on /var/lock type tmpfs (rw,noexec,nosuid,nodev,mode=1777)
udev on /dev type tmpfs (rw,mode=0755)
devshm on /dev/shm type tmpfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
lrm on /lib/modules/2.6.24-19-generic/volatile type tmpfs (rw)
securityfs on /sys/kernel/security type securityfs (rw)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
gvfs-fuse-daemon on /home/user/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=user)
as i get this error writing to any location in the homedir, there is little (read: "no") chance that standard file/dir perms are the issue.

i have gone so far as to 'touch' the destination file first, still receive error.

i'm suspecting 'nosuid' as the culprit but this doesn't really jive with me. before I start tearing things down to t-shoot this i was wondering if anyone had any interesting input here.

thanks in advance;
~k

Last edited by kr0m3; 06-22-2008 at 08:39 PM. Reason: more info...
 
Old 06-23-2008, 04:00 AM   #2
storkus
Member
 
Registered: Jun 2008
Posts: 307

Rep: Reputation: 45
Wow, no wonder there haven't been any answers: that's a tough question! As root, you should *NEVER* receive permission errors unless you're doing something that really doesn't make sense, like running "more" on a directory or "ls" on a file.

"nosuid" could be a culprit; another possibility is a bug in that program. Since I've never used it, I can't help you there. If you
find something else about it, make sure to post about it.

Mike
 
Old 12-16-2009, 06:40 AM   #3
xcecco1
LQ Newbie
 
Registered: Dec 2009
Posts: 1

Rep: Reputation: 0
Re: tshark error : solution

I ave the same problem.
The solution seems to be this:
Change the owner of the directory whom you are writing the
output file as the same user running tshark, or dumpcap...
E.g.: if you are root, make sure (che) your working dir
(who tshark are creating the file(s)) is owned by root..

Excuse (tanto) my poor english
 
  


Reply

Tags
error, permissions, tshark


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
NFS problem: "Could not chdir to home directory /home/USER: Permission denied" sumanc Linux - Server 4 07-22-2010 04:12 PM
"Permission denied" and "recursive directory loop" when searching for string in files mack1e Linux - Newbie 5 06-12-2008 07:38 AM
Submount, "permission denied" when writing to floppy as normal user DaneM Linux - Software 5 02-22-2006 02:05 PM
What is this "?" File in my home dir? stardotstar Linux - Software 3 01-22-2006 03:57 PM
sendmail: "permission denied" when using include:/file sohmc Linux - Software 1 05-22-2003 06:40 AM


All times are GMT -5. The time now is 07:11 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration