Ethical Hacking

Learn to find vulnerabilities before the bad guys do! Gain real world hands on hacking experience in our state of the art hacking lab. Course designed and taught by expert instructors with years of penetration testing experience. 12 student maximum in every class. Certification attempt included in every package.
Computer Forensics Training at InfoSec Institute

Gain the in-demand skills of a certified computer examiner, learn to recover trace data left behind by fraud, theft, and cybercrime perpetrators. Discover the source of computer crime and abuse at your organization so that it never happens again. All of our class sizes are guaranteed to be 12 students or less to facilitate one-on-one interaction with one of our expert instructors.




Network Security Secure-Shell
[Top] [All Lists]

Re: wrong group set when sftp

Subject: Re: wrong group set when sftp
Date: Thu, 26 May 2005 14:01:27 +0300
Yes i use PAM...

Below is the processes and id prints

#id
uid=508(user) gid=528(www) groups=528(www)

#ps aux | grep ssh

root       871  0.0  0.2  2964 1116 ?        S    May17   0:05 /usr/sbin/sshd
root     18291  0.0  0.2  5560 1536 ?        S    12:58   0:00 sshd: root@pts/0
root     18411  0.0  0.2  5552 1456 ?        S    13:05   0:00 sshd: user [priv]
user    18413  0.0  0.3  5616 1592 ?        S    13:05   0:00 sshd: user@notty
user    18414  0.0  0.1  2544  784 ?        S    13:05   0:00
/usr/libexec/openssh/sftp-server

#cat /proc/18414/status

Name:   sftp-server
State:  S (sleeping)
Tgid:   18414
Pid:    18414
PPid:   18413
TracerPid:      0
Uid:    508     508     508     508
Gid:    528     0       0       0
FDSize: 32
Groups: 528

Should all the gid's be 528, or is it normal?  Its parent seems to be ok.

#cat /proc/18413/status

Name:   sshd
State:  S (sleeping)
Tgid:   18413
Pid:    18413
PPid:   18411
TracerPid:      0
Uid:    508     508     508     508
Gid:    528     528     528     528
FDSize: 32
Groups: 528




On 5/25/05, Darren Tucker <dtucker@zip.com.au> wrote:
security security wrote:
I'm using OpenSSH_4.0p1 on a RedHat Linux 7.3 box. Linux kernel 2.4.18-3
I has OpenSSL 0.9.6b [engine] under.
when using sftp, the copied file's group is set to 0 (root),
though the group of the user is not root. I'm using
I tried both winscp and sftp, but come up with the same result.
Using winscp, also disabled set permissions, and timestamp options.
but it just doesn't work.

How is OpenSSH configured?  In particular, are you using PAM?

When you log in via ssh to the system, what does the "id" command
report?  Also, try running sftp, then get the pid of the sftp-server
process and do "cat cat /proc/[pid]/status".

--
Darren Tucker (dtucker at zip.com.au)
GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4  37C9 C982 80C7 8FF4 FA69
     Good judgement comes with experience. Unfortunately, the experience
usually comes from bad judgement.


<Prev in Thread] Current Thread [Next in Thread>