Truss and the FTP command


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Truss and the FTP command
# 1  
Old 02-01-2005
Truss and the FTP command

I have been trying to perform the following command without success

truss -feo truss.out ftp -nvd < ftpcmds.txt
The error I am getting is
"truss: cannot trace set_id or unreadable object file /usr/bin/ftp"

I have tested the file that contains the ftp commands and it works fine with
ftp -nvd < ftpcmds.txt

However, I do need to use this in conjuntion with the truss command.

Can anyone help?
# 2  
Old 02-01-2005
It looks like ftp has the setuid bit turned on. Probably to be able to read files.
Depending on how your system is set up, you may have to copy the ftp image to another directory, log in as root, clear the setuid bit, then run truss.

That's my best guess from what I see here.
# 3  
Old 02-01-2005
ftp may simply be unreadable. Do an "ls -l /usr/bin/ftp". If you run truss as root it should work without changing the permissions on ftp.
# 4  
Old 02-01-2005
I had a version of tusc (HPUX 10 version of truss) that would never run a file with the setuid bit on. My current version does not have that problem. Or feature.
# 5  
Old 02-01-2005
Quote:
Originally Posted by jim mcnamara
I had a version of tusc (HPUX 10 version of truss) that would never run a file with the setuid bit on. My current version does not have that problem. Or feature.
debuggers should refuse to run on programs when the effective uid is different than the real uid unless the real uid is root. They should also refuse to run on an unreadable text file. Failure to enforce these restrictions is a security problem. I thought that the ptrace system call itself enforced these restrictions but I only find:
Quote:
[EPERM] The specified process cannot be attached for tracing.
[EPERM] The process pid is already being traced or pid refers to the calling process itself.
with no precise definition of why a process might not be attachable.
# 6  
Old 02-02-2005
Truss and FTP

Hi,
Thanks for your assistance.
FTP is readable.
However, the command works fine only when I am logged on as Root.

I am looking into the SETUID now.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Trying to debug truss command of PID in Solaris 10.

I'm getting the following output from a truss operation of a PID from an application that will not start properly, something with the writing to an archive. Here is the output: open("arch/chkpt.arch", O_RDWR) Err#13 EACCES open("arch/chkpt.arch", O_RDWR|O_CREAT|O_TRUNC, 0666)... (6 Replies)
Discussion started by: chadpierce62
6 Replies

2. UNIX for Advanced & Expert Users

unable to understand the output of TRUSS command

Hi, I am trying to set ulimit for soft stack unlimited, but this is not taking effect, after tracing the ulimit -a unlimited command, the below output was generated, which i am unable to comprehend. Could any one help me with this? prcbap1-r10prod: truss -d ulimit -s unlimited Tue Dec 30... (2 Replies)
Discussion started by: NasirAbbasi
2 Replies

3. UNIX for Advanced & Expert Users

Truss output

Hi, I want to trace a background java program which runs in infinite loop. I have used truss command for this. But the program terminated after some hours with below truss output: Received signal #1, SIGHUP, in lwp_cond_wait() /1: siginfo: SIG#0 Please let me know what... (5 Replies)
Discussion started by: Hara Prasad
5 Replies

4. UNIX for Dummies Questions & Answers

Truss output

Hi, I want to trace a background java program which runs in infinite loop. I have used truss command for this. But the program terminated after some hours with below truss output: Received signal #1, SIGHUP, in lwp_cond_wait() /1: siginfo: SIG#0 Please let me know what... (0 Replies)
Discussion started by: Hara Prasad
0 Replies

5. AIX

Truss output

Hello, I'm using AIX 5.3.12.5 and trying to understand truss output. I'm running a job with real time of 16 minutes but only 4 minutes of CPU time. I'm trying to understand what the process is doing. I'm getting a lot of kread, kpread, kwrite, kpwrite... localhost:~ x$ grep... (1 Reply)
Discussion started by: Kovacs
1 Replies

6. Shell Programming and Scripting

need help with truss !

i have to gather some info about a process and redirect it to a1.txt file. For this i m using truss command truss -po a1.txt $PID_Detail where $PID_Detail= 1482944 3362976 -------------------------------------------------------------------------- Below the script: #!/bin/ksh for i... (6 Replies)
Discussion started by: ali560045
6 Replies

7. Shell Programming and Scripting

truss output

Hi I have to get redirect the truss ouput to file. I am doing truss -p 12121 >> output.txt But it still displays on the screen adn output.txt is empty Can some help how to do this? Thanks in advance Ammu (1 Reply)
Discussion started by: ammu
1 Replies

8. Shell Programming and Scripting

how to use truss?

Hi all, while trying to debug and figure out why a lofiadm command was not working on my script, i came across a cmd called "truss" all i know about it is that it executes the specified command and produces a trace of the system calls it performs, the signals it receives, and the machine faults... (5 Replies)
Discussion started by: wrapster
5 Replies

9. IP Networking

truss results

I have tried to analyze the log of truss shown below. I haven't found anything clear for me indicating the problem. The process is the server that accepts client connections. To establish the connection it starts the child thread then it should transfer data. In reality it gets only connection.... (1 Reply)
Discussion started by: gogogo
1 Replies

10. UNIX for Advanced & Expert Users

truss

I'm a DBA so no abuse please! I've for 5 Oracle Forms processes that are spinning and am trying to find out if they're doing anything: Running HPUX 11.11 CPU TTY PID USERNAME PRI NI SIZE RES STATE TIME %WCPU %CPU COMMAND 9 ? 2735 oracle 241 20 24228K 16668K run 2607:29 84.92... (2 Replies)
Discussion started by: fraze
2 Replies
Login or Register to Ask a Question