[scponly] sftp-server "No such file or directory"

Dean Montgomery dmonty at sd73.bc.ca
Wed Feb 6 12:06:01 EST 2008


File system does not have noexec set.

/home/dean/usr/lib/sftp-server
* File permissions 755
* Parent folder permissions 755
* File/Folders owner root:root


The kernel outside the vserver is:
2.6.18-3-vserver-amd64 #1 SMP Mon Dec 4 17:19:24 CET 2006 x86_64 GNU/Linux

The inside the vserver is also running amd64 libs.

Could it have something to do with being run in a vserver?
Setting the shell to /usr/bin/scponly works but /usr/sbin/scponlyc does not.

I've attached the 3 strace logs.

On February 5, 2008, you wrote:
> Dean,
>
> As it looks like the sftp-server exists at /usr/lib/sftp-server within
> your chroot, make sure that the permissions allow it to be executed
> and make sure that the filesystem isn't mounted 'noexec'.
>
> I can't think of anything else off the top of my head, so hopefully
> that will solve it.  If not, post back with whatever additional
> details you can provide.
>
> Thanks.
>
> --Kaleb
>
> On Feb 5, 2008 4:14 PM, Dean Montgomery <dmonty at sd73.bc.ca> wrote:
> > I'm running debian etch on a vserver and I'm unable to get scponlyc
> > working. The non-chroot scponly works fine.
> >
> >
> > When I follow the FAQ page I get
> > strace -o sftp.log -f -ff -p 2126
> > grep "^exec" sftp.log*
> > sftp.log.2193:execve("/usr/sbin/scponlyc",
> > ["scponlyc", "-c", "/usr/lib/openssh/sftp-server"], [/* 9 vars */]) = 0
> > sftp.log.2193:execve("/usr/lib/sftp-server", ["/usr/lib/sftp-server"],
> > [/* 2 vars */]) = -1 ENOENT (No such file or directory)
> >
> > if you want I'll send a full copy of sftp.log.2193.
> >
> > In /var/log/auth.log I see:
> > =========================
> > Feb  5 11:23:09 vsbaseweb sshd[2126]: Accepted password for dean from
> > 192.168.2.2 port 54386 ssh2
> > Feb  5 11:23:09 vsbaseweb sshd[2192]: (pam_unix) session opened for user
> > dean by (uid=0)
> > Feb  5 11:23:09 vsbaseweb sshd[2192]: subsystem request for sftp
> > Feb  5 11:23:09 vsbaseweb scponly[2193]: chrooted binary in place, will
> > chroot()
> > Feb  5 11:23:09 vsbaseweb scponly[2193]: 3 arguments in total.
> > Feb  5 11:23:09 vsbaseweb scponly[2193]: ^Iarg 0 is scponlyc
> > Feb  5 11:23:09 vsbaseweb scponly[2193]: ^Iarg 1 is -c
> > Feb  5 11:23:09 vsbaseweb scponly[2193]: ^Iarg 2
> > is /usr/lib/openssh/sftp-server
> > Feb  5 11:23:09 vsbaseweb scponly[2193]: opened log at LOG_AUTHPRIV, opts
> > 0x00000029
> > Feb  5 11:23:09 vsbaseweb scponly[2193]: retrieved home directory
> > of "/home/dean" for user "dean"
> > Feb  5 11:23:09 vsbaseweb scponly[2193]: chrooting to dir: "/home/dean"
> > Feb  5 11:23:09 vsbaseweb scponly[2193]: chdiring to dir: "/"
> > Feb  5 11:23:09 vsbaseweb scponly[2193]: chdiring to dir: "/"
> > Feb  5 11:23:09 vsbaseweb scponly[2193]: setting uid to 1022
> > Feb  5 11:23:09 vsbaseweb scponly[2193]: processing
> > request: "/usr/lib/openssh/sftp-server"
> > Feb  5 11:23:09 vsbaseweb scponly[2193]: Found "HOME" and setting it
> > to "/home/dean"
> > Feb  5 11:23:09 vsbaseweb scponly[2193]: Environment
> > contains "HOME=/home/dean"
> > Feb  5 11:23:09 vsbaseweb scponly[2193]: set HOME environment variable to
> > / username: dean(1022), IP/port: 192.168.2.2 54386 22
> > Feb  5 11:23:09 vsbaseweb scponly[2193]: running: /usr/lib/sftp-server
> > (username: dean(1022), IP/port: 192.168.2.2 54386 22)
> > Feb  5 11:23:09 vsbaseweb scponly[2193]: failed: /usr/lib/sftp-server
> > with error No such file or directory(2) (username: dean(1022), IP/port:
> > 192.168.2.2
> > 54386 22)
> > =========================
> >
> > My chroot looks like:
> > |-- bin
> > |
> > |   |-- chgrp
> > |   |-- chmod
> > |   |-- chown
> > |   |-- echo
> > |   |-- ln
> > |   |-- ls
> > |   |-- mkdir
> > |   |-- mv
> > |   |-- pwd
> > |   |-- rm
> > |   |-- rmdir
> > |
> > |   `-- scp
> > |-- dev
> > |   `-- null
> > |-- etc
> > |   `-- passwd
> > |-- incoming
> > |-- lib
> > |
> > |   |-- ld-linux.so.2
> > |   |-- libacl.so.1
> > |   |-- libattr.so.1
> > |   |-- libc.so.6
> > |   |-- libcom_err.so.2
> > |   |-- libcrypt.so.1
> > |   |-- libdl.so.2
> > |   |-- libnsl.so.1
> > |   |-- libnss_compat-2.3.6.so
> > |   |-- libnss_compat.so.2
> > |   |-- libpam.so.0
> > |   |-- libpam_misc.so.0
> > |   |-- libpopt.so.0
> > |   |-- libpthread.so.0
> > |   |-- libresolv.so.2
> > |   |-- librt.so.1
> > |   |-- libselinux.so.1
> > |   |-- libsepol.so.1
> > |
> > |   `-- libutil.so.1
> > |-- usr
> > |
> > |   |-- bin
> > |   |
> > |   |   |-- groups
> > |   |   |-- id
> > |   |   |-- passwd
> > |   |   |-- rsync
> > |   |
> > |   |   `-- scp
> > |
> > |   `-- lib
> > |
> > |       |-- libcrypto.so.0.9.8
> > |       |-- libgssapi_krb5.so.2
> > |       |-- libk5crypto.so.3
> > |       |-- libkrb5.so.3
> > |       |-- libkrb5support.so.0
> > |       |-- libz.so.1
> > |       |-- openssh
> > |       |   `-- sftp-server
> > |
> > |       `-- sftp-server
> >
> > _______________________________________________
> > scponly mailing list
> > scponly at lists.ccs.neu.edu
> > https://lists.ccs.neu.edu/bin/listinfo/scponly



-- 
Dean Montgomery
Network Support Tech./Programmer
School District #73
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sftp.log
Type: text/x-log
Size: 4706 bytes
Desc: not available
Url : https://lists.ccs.neu.edu/pipermail/scponly/attachments/20080206/464cabb1/attachment-0001.bin 
-------------- next part --------------
close(5)                                = 0
getuid()                                = 0
setgid(1022)                            = 0
open("/proc/sys/kernel/ngroups_max", O_RDONLY) = 5
read(5, "65536\n", 31)                  = 6
close(5)                                = 0
open("/etc/group", O_RDONLY)            = 5
fcntl(5, F_GETFD)                       = 0
fcntl(5, F_SETFD, FD_CLOEXEC)           = 0
lseek(5, 0, SEEK_CUR)                   = 0
fstat(5, {st_mode=S_IFREG|0644, st_size=1723, ...}) = 0
mmap(NULL, 1723, PROT_READ, MAP_SHARED, 5, 0) = 0x2b6c5dd2b000
lseek(5, 1723, SEEK_SET)                = 1723
fstat(5, {st_mode=S_IFREG|0644, st_size=1723, ...}) = 0
munmap(0x2b6c5dd2b000, 1723)            = 0
close(5)                                = 0
setgroups(1, [1022])                    = 0
getuid()                                = 0
getuid()                                = 0
time([1202239389])                      = 1202239389
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1037, ...}) = 0
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1037, ...}) = 0
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1037, ...}) = 0
socket(PF_FILE, SOCK_DGRAM, 0)          = 5
fcntl(5, F_SETFD, FD_CLOEXEC)           = 0
connect(5, {sa_family=AF_FILE, path="/dev/log"}, 16) = 0
sendto(5, "<38>Feb  5 11:23:09 sshd[2192]: "..., 82, MSG_NOSIGNAL, NULL, 0) = 82
open("/etc/motd", O_RDONLY)             = -1 ENOENT (No such file or directory)
stat("/var/mail/dean", 0x7fff4cd94900)  = -1 ENOENT (No such file or directory)
open("/etc/passwd", O_RDONLY)           = 6
fcntl(6, F_GETFD)                       = 0
fcntl(6, F_SETFD, FD_CLOEXEC)           = 0
lseek(6, 0, SEEK_CUR)                   = 0
fstat(6, {st_mode=S_IFREG|0644, st_size=6816, ...}) = 0
mmap(NULL, 6816, PROT_READ, MAP_SHARED, 6, 0) = 0x2b6c5dd2b000
lseek(6, 6816, SEEK_SET)                = 6816
munmap(0x2b6c5dd2b000, 6816)            = 0
close(6)                                = 0
getrlimit(RLIMIT_CPU, {rlim_cur=RLIM_INFINITY, rlim_max=RLIM_INFINITY}) = 0
getrlimit(RLIMIT_FSIZE, {rlim_cur=RLIM_INFINITY, rlim_max=RLIM_INFINITY}) = 0
getrlimit(RLIMIT_DATA, {rlim_cur=RLIM_INFINITY, rlim_max=RLIM_INFINITY}) = 0
getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM_INFINITY}) = 0
getrlimit(RLIMIT_CORE, {rlim_cur=0, rlim_max=RLIM_INFINITY}) = 0
getrlimit(RLIMIT_RSS, {rlim_cur=RLIM_INFINITY, rlim_max=RLIM_INFINITY}) = 0
getrlimit(RLIMIT_NPROC, {rlim_cur=RLIM_INFINITY, rlim_max=RLIM_INFINITY}) = 0
getrlimit(RLIMIT_NOFILE, {rlim_cur=1024, rlim_max=1024*1024}) = 0
getrlimit(RLIMIT_MEMLOCK, {rlim_cur=RLIM_INFINITY, rlim_max=RLIM_INFINITY}) = 0
getrlimit(RLIMIT_AS, {rlim_cur=RLIM_INFINITY, rlim_max=RLIM_INFINITY}) = 0
getrlimit(RLIMIT_LOCKS, {rlim_cur=RLIM_INFINITY, rlim_max=RLIM_INFINITY}) = 0
getrlimit(RLIMIT_SIGPENDING, {rlim_cur=RLIM_INFINITY, rlim_max=RLIM_INFINITY}) = 0
getrlimit(RLIMIT_MSGQUEUE, {rlim_cur=RLIM_INFINITY, rlim_max=RLIM_INFINITY}) = 0
getrlimit(RLIMIT_NICE, {rlim_cur=0, rlim_max=0}) = 0
getrlimit(RLIMIT_RTPRIO, {rlim_cur=0, rlim_max=0}) = 0
getpriority(PRIO_PROCESS, 0)            = 20
open("/etc/security/limits.conf", O_RDONLY) = 6
fstat(6, {st_mode=S_IFREG|0644, st_size=1802, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b6c5dd2b000
read(6, "# /etc/security/limits.conf\n#\n#E"..., 4096) = 1802
read(6, "", 4096)                       = 0
close(6)                                = 0
munmap(0x2b6c5dd2b000, 4096)            = 0
setrlimit(RLIMIT_CPU, {rlim_cur=RLIM_INFINITY, rlim_max=RLIM_INFINITY}) = 0
setrlimit(RLIMIT_FSIZE, {rlim_cur=RLIM_INFINITY, rlim_max=RLIM_INFINITY}) = 0
setrlimit(RLIMIT_DATA, {rlim_cur=RLIM_INFINITY, rlim_max=RLIM_INFINITY}) = 0
setrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM_INFINITY}) = 0
setrlimit(RLIMIT_CORE, {rlim_cur=0, rlim_max=RLIM_INFINITY}) = 0
setrlimit(RLIMIT_RSS, {rlim_cur=RLIM_INFINITY, rlim_max=RLIM_INFINITY}) = 0
setrlimit(RLIMIT_NPROC, {rlim_cur=RLIM_INFINITY, rlim_max=RLIM_INFINITY}) = 0
setrlimit(RLIMIT_NOFILE, {rlim_cur=RLIM_INFINITY, rlim_max=RLIM_INFINITY}) = -1 EPERM (Operation not permitted)
setrlimit(RLIMIT_MEMLOCK, {rlim_cur=RLIM_INFINITY, rlim_max=RLIM_INFINITY}) = 0
setrlimit(RLIMIT_AS, {rlim_cur=RLIM_INFINITY, rlim_max=RLIM_INFINITY}) = 0
setrlimit(RLIMIT_LOCKS, {rlim_cur=RLIM_INFINITY, rlim_max=RLIM_INFINITY}) = 0
setrlimit(RLIMIT_SIGPENDING, {rlim_cur=RLIM_INFINITY, rlim_max=RLIM_INFINITY}) = 0
setrlimit(RLIMIT_MSGQUEUE, {rlim_cur=RLIM_INFINITY, rlim_max=RLIM_INFINITY}) = 0
setrlimit(RLIMIT_NICE, {rlim_cur=0, rlim_max=0}) = 0
setrlimit(RLIMIT_RTPRIO, {rlim_cur=0, rlim_max=0}) = 0
setpriority(PRIO_PROCESS, 0, 0)         = 0
open("/etc/security/pam_env.conf", O_RDONLY) = 6
fstat(6, {st_mode=S_IFREG|0644, st_size=3099, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b6c5dd2b000
read(6, "# $Date: 2004/11/16 14:27:41 $\n#"..., 4096) = 3099
read(6, "", 4096)                       = 0
close(6)                                = 0
munmap(0x2b6c5dd2b000, 4096)            = 0
open("/etc/environment", O_RDONLY)      = -1 ENOENT (No such file or directory)
open("/etc/security/pam_env.conf", O_RDONLY) = 6
fstat(6, {st_mode=S_IFREG|0644, st_size=3099, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b6c5dd2b000
read(6, "# $Date: 2004/11/16 14:27:41 $\n#"..., 4096) = 3099
read(6, "", 4096)                       = 0
close(6)                                = 0
munmap(0x2b6c5dd2b000, 4096)            = 0
open("/etc/default/locale", O_RDONLY)   = -1 ENOENT (No such file or directory)
getuid()                                = 0
getgid()                                = 1022
setregid(1022, 1022)                    = 0
setreuid(1022, 1022)                    = 0
getgid()                                = 1022
getegid()                               = 1022
setuid(0)                               = -1 EPERM (Operation not permitted)
setresuid(-1, 0, -1)                    = -1 EPERM (Operation not permitted)
getuid()                                = 1022
geteuid()                               = 1022
getuid()                                = 1022
geteuid()                               = 1022
open("/proc/filesystems", O_RDONLY)     = 6
read(6, "nodev\tsysfs\nnodev\trootfs\nnodev\tb"..., 4095) = 280
close(6)                                = 0
rt_sigaction(SIGCHLD, NULL, {SIG_DFL}, 8) = 0
rt_sigaction(SIGCHLD, {0x40f020, [], SA_RESTORER, 0x2b6c5f042110}, NULL, 8) = 0
pipe([6, 7])                            = 0
fcntl(6, F_SETFD, FD_CLOEXEC)           = 0
fcntl(7, F_SETFD, FD_CLOEXEC)           = 0
fcntl(6, F_GETFL)                       = 0 (flags O_RDONLY)
fcntl(6, F_SETFL, O_RDONLY|O_NONBLOCK)  = 0
fcntl(7, F_GETFL)                       = 0x1 (flags O_WRONLY)
fcntl(7, F_SETFL, O_WRONLY|O_NONBLOCK)  = 0
select(7, [3 6], [], NULL, NULL)        = 1 (in [3])
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
read(3, "\301\252\312O\300\231\255\252\364.\4\0q\320g\17\351\343"..., 16384) = 64
ioctl(-1, SNDCTL_TMR_TIMEBASE or TCGETS, 0x7fff4cd94840) = -1 EBADF (Bad file descriptor)
ioctl(-1, SNDCTL_TMR_TIMEBASE or TCGETS, 0x7fff4cd94840) = -1 EBADF (Bad file descriptor)
select(7, [3 6], [3], NULL, NULL)       = 1 (out [3])
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
write(3, "\26\246\6\355}*\1\224k\27\326zI\256d\346\370Ec4Y=(\367"..., 48) = 48
select(7, [3 6], [], NULL, NULL)        = 1 (in [3])
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
read(3, "\367\242\227 2\243P\230\267\360|\345\210\360H\205jT\241"..., 16384) = 128
time([1202239389])                      = 1202239389
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1037, ...}) = 0
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1037, ...}) = 0
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1037, ...}) = 0
sendto(5, "<38>Feb  5 11:23:09 sshd[2192]: "..., 58, MSG_NOSIGNAL, NULL, 0) = 58
close(5)                                = 0
stat("/usr/lib/openssh/sftp-server", {st_mode=S_IFREG|0755, st_size=45808, ...}) = 0
socketpair(PF_FILE, SOCK_STREAM, 0, [5, 8]) = 0
socketpair(PF_FILE, SOCK_STREAM, 0, [9, 10]) = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x2b6c5f396950) = 2193
getsockname(3, {sa_family=AF_INET, sin_port=htons(22), sin_addr=inet_addr("192.168.2.2")}, [16]) = 0
--- SIGCHLD (Child exited) @ 0 (0) ---
rt_sigaction(SIGCHLD, NULL, {0x40f020, [], SA_RESTORER, 0x2b6c5f042110}, 8) = 0
write(7, "\0", 1)                       = 1
rt_sigreturn(0x7)                       = 0
setsockopt(3, SOL_IP, IP_TOS, [8], 4)   = 0
close(5)                                = 0
close(9)                                = 0
ioctl(8, SNDCTL_TMR_TIMEBASE or TCGETS, 0x7fff4cd94740) = -1 EINVAL (Invalid argument)
ioctl(8, SNDCTL_TMR_TIMEBASE or TCGETS, 0x7fff4cd94740) = -1 EINVAL (Invalid argument)
fcntl(8, F_GETFL)                       = 0x2 (flags O_RDWR)
fcntl(8, F_SETFL, O_RDWR|O_NONBLOCK)    = 0
fcntl(8, F_GETFL)                       = 0x802 (flags O_RDWR|O_NONBLOCK)
select(9, [3 6 8], [3], NULL, {0, 100000}) = 3 (in [6 8], out [3], left {0, 100000})
read(6, "\0", 1)                        = 1
read(6, 0x7fff4cd949bf, 1)              = -1 EAGAIN (Resource temporarily unavailable)
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
wait4(-1, [{WIFSIGNALED(s) && WTERMSIG(s) == SIGABRT}], WNOHANG, NULL) = 2193
shutdown(8, 1 /* send */)               = 0
wait4(-1, 0x7fff4cd949dc, WNOHANG, NULL) = -1 ECHILD (No child processes)
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
read(8, "", 16384)                      = 0
shutdown(8, 0 /* receive */)            = 0
write(3, "z\352\367\261J\341\264\t\v\370\345\217\363\256\21084\24"..., 144) = 144
select(9, [3 6], [3], NULL, NULL)       = 1 (out [3])
-------------- next part --------------
setsid()                                = 2193
close(8)                                = 0
close(10)                               = 0
dup2(5, 0)                              = 0
dup2(5, 1)                              = 1
dup2(9, 2)                              = 2
getuid()                                = 1022
geteuid()                               = 1022
getuid()                                = 1022
geteuid()                               = 1022
open("/proc/filesystems", O_RDONLY)     = 8
read(8, "nodev\tsysfs\nnodev\trootfs\nnodev\tb"..., 4095) = 280
close(8)                                = 0
getsockname(3, {sa_family=AF_INET, sin_port=htons(22), sin_addr=inet_addr("192.168.2.2")}, [16]) = 0
getsockname(3, {sa_family=AF_INET, sin_port=htons(22), sin_addr=inet_addr("192.168.2.2")}, [5537536381665935376]) = 0
getsockname(3, {sa_family=AF_INET, sin_port=htons(22), sin_addr=inet_addr("192.168.2.2")}, [233586091360272]) = 0
close(3)                                = 0
close(3)                                = -1 EBADF (Bad file descriptor)
close(4)                                = 0
close(5)                                = 0
close(6)                                = 0
close(7)                                = 0
close(8)                                = -1 EBADF (Bad file descriptor)
close(9)                                = 0
close(10)                               = -1 EBADF (Bad file descriptor)
close(11)                               = -1 EBADF (Bad file descriptor)
close(12)                               = -1 EBADF (Bad file descriptor)
close(13)                               = -1 EBADF (Bad file descriptor)
close(14)                               = -1 EBADF (Bad file descriptor)
close(15)                               = -1 EBADF (Bad file descriptor)
close(16)                               = -1 EBADF (Bad file descriptor)
close(17)                               = -1 EBADF (Bad file descriptor)
close(18)                               = -1 EBADF (Bad file descriptor)
close(19)                               = -1 EBADF (Bad file descriptor)
close(20)                               = -1 EBADF (Bad file descriptor)
close(21)                               = -1 EBADF (Bad file descriptor)
close(22)                               = -1 EBADF (Bad file descriptor)
close(23)                               = -1 EBADF (Bad file descriptor)
close(24)                               = -1 EBADF (Bad file descriptor)
close(25)                               = -1 EBADF (Bad file descriptor)
close(26)                               = -1 EBADF (Bad file descriptor)
close(27)                               = -1 EBADF (Bad file descriptor)
close(28)                               = -1 EBADF (Bad file descriptor)
close(29)                               = -1 EBADF (Bad file descriptor)
close(30)                               = -1 EBADF (Bad file descriptor)
close(31)                               = -1 EBADF (Bad file descriptor)
close(32)                               = -1 EBADF (Bad file descriptor)
close(33)                               = -1 EBADF (Bad file descriptor)
close(34)                               = -1 EBADF (Bad file descriptor)
close(35)                               = -1 EBADF (Bad file descriptor)
close(36)                               = -1 EBADF (Bad file descriptor)
close(37)                               = -1 EBADF (Bad file descriptor)
close(38)                               = -1 EBADF (Bad file descriptor)
close(39)                               = -1 EBADF (Bad file descriptor)
close(40)                               = -1 EBADF (Bad file descriptor)
close(41)                               = -1 EBADF (Bad file descriptor)
close(42)                               = -1 EBADF (Bad file descriptor)
close(43)                               = -1 EBADF (Bad file descriptor)
close(44)                               = -1 EBADF (Bad file descriptor)
close(45)                               = -1 EBADF (Bad file descriptor)
close(46)                               = -1 EBADF (Bad file descriptor)
close(47)                               = -1 EBADF (Bad file descriptor)
close(48)                               = -1 EBADF (Bad file descriptor)
close(49)                               = -1 EBADF (Bad file descriptor)
close(50)                               = -1 EBADF (Bad file descriptor)
close(51)                               = -1 EBADF (Bad file descriptor)
close(52)                               = -1 EBADF (Bad file descriptor)
close(53)                               = -1 EBADF (Bad file descriptor)
close(54)                               = -1 EBADF (Bad file descriptor)
close(55)                               = -1 EBADF (Bad file descriptor)
close(56)                               = -1 EBADF (Bad file descriptor)
close(57)                               = -1 EBADF (Bad file descriptor)
close(58)                               = -1 EBADF (Bad file descriptor)
close(59)                               = -1 EBADF (Bad file descriptor)
close(60)                               = -1 EBADF (Bad file descriptor)
close(61)                               = -1 EBADF (Bad file descriptor)
close(62)                               = -1 EBADF (Bad file descriptor)
close(63)                               = -1 EBADF (Bad file descriptor)
chdir("/home/dean")       = 0
stat("/etc/ssh/sshrc", 0x7fff4cd94720)  = -1 ENOENT (No such file or directory)
rt_sigaction(SIGPIPE, NULL, {SIG_IGN}, 8) = 0
rt_sigaction(SIGPIPE, {SIG_DFL}, NULL, 8) = 0
execve("/usr/sbin/scponlyc", ["scponlyc", "-c", "/usr/lib/openssh/sftp-server"], [/* 9 vars */]) = 0
uname({sys="Linux", node="webserver", ...}) = 0
brk(0)                                  = 0x507000
fcntl(0, F_GETFD)                       = 0
fcntl(1, F_GETFD)                       = 0
fcntl(2, F_GETFD)                       = 0
access("/etc/suid-debug", F_OK)         = -1 ENOENT (No such file or directory)
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b40b320c000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=33110, ...}) = 0
mmap(NULL, 33110, PROT_READ, MAP_PRIVATE, 3, 0) = 0x2b40b320e000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/libc.so.6", O_RDONLY)        = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\200\305"..., 640) = 640
lseek(3, 624, SEEK_SET)                 = 624
read(3, "\4\0\0\0\20\0\0\0\1\0\0\0GNU\0\0\0\0\0\2\0\0\0\6\0\0\0"..., 32) = 32
fstat(3, {st_mode=S_IFREG|0755, st_size=1286104, ...}) = 0
mmap(NULL, 2344904, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2b40b330d000
mprotect(0x2b40b342e000, 1161160, PROT_NONE) = 0
mmap(0x2b40b352e000, 98304, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x121000) = 0x2b40b352e000
mmap(0x2b40b3546000, 14280, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2b40b3546000
close(3)                                = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b40b354a000
mprotect(0x2b40b352e000, 86016, PROT_READ) = 0
arch_prctl(ARCH_SET_FS, 0x2b40b354a6d0) = 0
munmap(0x2b40b320e000, 33110)           = 0
brk(0)                                  = 0x507000
brk(0x528000)                           = 0x528000
open("/usr/../etc/scponly/debuglevel", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=2, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b40b320e000
read(3, "2\n", 4096)                    = 2
close(3)                                = 0
munmap(0x2b40b320e000, 4096)            = 0
socket(PF_FILE, SOCK_DGRAM, 0)          = 3
fcntl(3, F_SETFD, FD_CLOEXEC)           = 0
connect(3, {sa_family=AF_FILE, path="/dev/log"}, 16) = 0
time([1202239389])                      = 1202239389
open("/etc/localtime", O_RDONLY)        = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=1037, ...}) = 0
fstat(4, {st_mode=S_IFREG|0644, st_size=1037, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b40b320e000
read(4, "TZif\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\4\0\0\0\4\0"..., 4096) = 1037
close(4)                                = 0
munmap(0x2b40b320e000, 4096)            = 0
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1037, ...}) = 0
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1037, ...}) = 0
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1037, ...}) = 0
getpid()                                = 2193
writev(2, [{"scponly[2193]: chrooted binary i"..., 54}, {"\n", 1}], 2) = 55
sendto(3, "<86>Feb  5 11:23:09 scponly[2193"..., 74, MSG_NOSIGNAL, NULL, 0) = 74
time([1202239389])                      = 1202239389
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1037, ...}) = 0
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1037, ...}) = 0
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1037, ...}) = 0
writev(2, [{"scponly[2193]: 3 arguments in to"..., 36}, {"\n", 1}], 2) = 37
sendto(3, "<87>Feb  5 11:23:09 scponly[2193"..., 56, MSG_NOSIGNAL, NULL, 0) = 56
time([1202239389])                      = 1202239389
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1037, ...}) = 0
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1037, ...}) = 0
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1037, ...}) = 0
writev(2, [{"scponly[2193]: \targ 0 is scponly"..., 33}, {"\n", 1}], 2) = 34
sendto(3, "<87>Feb  5 11:23:09 scponly[2193"..., 53, MSG_NOSIGNAL, NULL, 0) = 53
time([1202239389])                      = 1202239389
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1037, ...}) = 0
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1037, ...}) = 0
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1037, ...}) = 0
writev(2, [{"scponly[2193]: \targ 1 is -c", 27}, {"\n", 1}], 2) = 28
sendto(3, "<87>Feb  5 11:23:09 scponly[2193"..., 47, MSG_NOSIGNAL, NULL, 0) = 47
time([1202239389])                      = 1202239389
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1037, ...}) = 0
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1037, ...}) = 0
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1037, ...}) = 0
writev(2, [{"scponly[2193]: \targ 2 is /usr/li"..., 53}, {"\n", 1}], 2) = 54
sendto(3, "<87>Feb  5 11:23:09 scponly[2193"..., 73, MSG_NOSIGNAL, NULL, 0) = 73
time([1202239389])                      = 1202239389
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1037, ...}) = 0
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1037, ...}) = 0
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1037, ...}) = 0
writev(2, [{"scponly[2193]: opened log at LOG"..., 58}, {"\n", 1}], 2) = 59
sendto(3, "<87>Feb  5 11:23:09 scponly[2193"..., 78, MSG_NOSIGNAL, NULL, 0) = 78
getuid()                                = 1022
getuid()                                = 1022
socket(PF_FILE, SOCK_STREAM, 0)         = 4
fcntl(4, F_GETFL)                       = 0x2 (flags O_RDWR)
fcntl(4, F_SETFL, O_RDWR|O_NONBLOCK)    = 0
connect(4, {sa_family=AF_FILE, path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)
close(4)                                = 0
socket(PF_FILE, SOCK_STREAM, 0)         = 4
fcntl(4, F_GETFL)                       = 0x2 (flags O_RDWR)
fcntl(4, F_SETFL, O_RDWR|O_NONBLOCK)    = 0
connect(4, {sa_family=AF_FILE, path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)
close(4)                                = 0
open("/etc/nsswitch.conf", O_RDONLY)    = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=475, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b40b320e000
read(4, "# /etc/nsswitch.conf\n#\n# Example"..., 4096) = 475
read(4, "", 4096)                       = 0
close(4)                                = 0
munmap(0x2b40b320e000, 4096)            = 0
open("/etc/ld.so.cache", O_RDONLY)      = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=33110, ...}) = 0
mmap(NULL, 33110, PROT_READ, MAP_PRIVATE, 4, 0) = 0x2b40b320e000
close(4)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/libnss_compat.so.2", O_RDONLY) = 4
read(4, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\200\26\0"..., 640) = 640
fstat(4, {st_mode=S_IFREG|0644, st_size=35568, ...}) = 0
mmap(NULL, 1082632, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 4, 0) = 0x2b40b354b000
mprotect(0x2b40b3552000, 1053960, PROT_NONE) = 0
mmap(0x2b40b3652000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0x7000) = 0x2b40b3652000
close(4)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/libnsl.so.1", O_RDONLY)      = 4
read(4, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0000H\0\0"..., 640) = 640
fstat(4, {st_mode=S_IFREG|0644, st_size=85880, ...}) = 0
mmap(NULL, 1141064, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 4, 0) = 0x2b40b3654000
mprotect(0x2b40b3668000, 1059144, PROT_NONE) = 0
mmap(0x2b40b3767000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0x13000) = 0x2b40b3767000
mmap(0x2b40b3769000, 6472, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2b40b3769000
close(4)                                = 0
munmap(0x2b40b320e000, 33110)           = 0
open("/etc/ld.so.cache", O_RDONLY)      = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=33110, ...}) = 0
mmap(NULL, 33110, PROT_READ, MAP_PRIVATE, 4, 0) = 0x2b40b320e000
close(4)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/libnss_nis.so.2", O_RDONLY)  = 4
read(4, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0 $\0\0\0"..., 640) = 640
fstat(4, {st_mode=S_IFREG|0644, st_size=43440, ...}) = 0
mmap(NULL, 1090744, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 4, 0) = 0x2b40b376b000
mprotect(0x2b40b3774000, 1053880, PROT_NONE) = 0
mmap(0x2b40b3874000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0x9000) = 0x2b40b3874000
close(4)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/libnss_files.so.2", O_RDONLY) = 4
read(4, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\20#\0\0"..., 640) = 640
fstat(4, {st_mode=S_IFREG|0644, st_size=43368, ...}) = 0
mmap(NULL, 1090856, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 4, 0) = 0x2b40b3876000
mprotect(0x2b40b3880000, 1049896, PROT_NONE) = 0
mmap(0x2b40b397f000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0x9000) = 0x2b40b397f000
close(4)                                = 0
munmap(0x2b40b320e000, 33110)           = 0
open("/etc/passwd", O_RDONLY)           = 4
fcntl(4, F_GETFD)                       = 0
fcntl(4, F_SETFD, FD_CLOEXEC)           = 0
lseek(4, 0, SEEK_CUR)                   = 0
fstat(4, {st_mode=S_IFREG|0644, st_size=6816, ...}) = 0
mmap(NULL, 6816, PROT_READ, MAP_SHARED, 4, 0) = 0x2b40b320e000
lseek(4, 6816, SEEK_SET)                = 6816
munmap(0x2b40b320e000, 6816)            = 0
close(4)                                = 0
time([1202239389])                      = 1202239389
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1037, ...}) = 0
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1037, ...}) = 0
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1037, ...}) = 0
writev(2, [{"scponly[2193]: retrieved home di"..., 85}, {"\n", 1}], 2) = 86
sendto(3, "<87>Feb  5 11:23:09 scponly[2193"..., 105, MSG_NOSIGNAL, NULL, 0) = 105
stat("/home/dean", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
time([1202239389])                      = 1202239389
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1037, ...}) = 0
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1037, ...}) = 0
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1037, ...}) = 0
writev(2, [{"scponly[2193]: chrooting to dir:"..., 59}, {"\n", 1}], 2) = 60
sendto(3, "<87>Feb  5 11:23:09 scponly[2193"..., 79, MSG_NOSIGNAL, NULL, 0) = 79
chroot("/home/dean")      = 0
time([1202239389])                      = 1202239389
stat("/etc/localtime", 0x7ffff78b2fe0)  = -1 ENOENT (No such file or directory)
open("/etc/localtime", O_RDONLY)        = -1 ENOENT (No such file or directory)
open("/etc/localtime", O_RDONLY)        = -1 ENOENT (No such file or directory)
open("/etc/localtime", O_RDONLY)        = -1 ENOENT (No such file or directory)
writev(2, [{"scponly[2193]: chdiring to dir: "..., 35}, {"\n", 1}], 2) = 36
sendto(3, "<87>Feb  5 11:23:09 scponly[2193"..., 55, MSG_NOSIGNAL, NULL, 0) = 55
chdir("/")                              = 0
time([1202239389])                      = 1202239389
open("/etc/localtime", O_RDONLY)        = -1 ENOENT (No such file or directory)
open("/etc/localtime", O_RDONLY)        = -1 ENOENT (No such file or directory)
open("/etc/localtime", O_RDONLY)        = -1 ENOENT (No such file or directory)
writev(2, [{"scponly[2193]: chdiring to dir: "..., 35}, {"\n", 1}], 2) = 36
sendto(3, "<87>Feb  5 19:23:09 scponly[2193"..., 55, MSG_NOSIGNAL, NULL, 0) = 55
chdir("/")                              = 0
getuid()                                = 1022
time([1202239389])                      = 1202239389
open("/etc/localtime", O_RDONLY)        = -1 ENOENT (No such file or directory)
open("/etc/localtime", O_RDONLY)        = -1 ENOENT (No such file or directory)
open("/etc/localtime", O_RDONLY)        = -1 ENOENT (No such file or directory)
writev(2, [{"scponly[2193]: setting uid to 10"..., 34}, {"\n", 1}], 2) = 35
sendto(3, "<87>Feb  5 19:23:09 scponly[2193"..., 54, MSG_NOSIGNAL, NULL, 0) = 54
getuid()                                = 1022
setresuid(-1, 1022, -1)                 = 0
time([1202239389])                      = 1202239389
open("/etc/localtime", O_RDONLY)        = -1 ENOENT (No such file or directory)
open("/etc/localtime", O_RDONLY)        = -1 ENOENT (No such file or directory)
open("/etc/localtime", O_RDONLY)        = -1 ENOENT (No such file or directory)
writev(2, [{"scponly[2193]: processing reques"..., 66}], 1) = 66
sendto(3, "<87>Feb  5 19:23:09 scponly[2193"..., 86, MSG_NOSIGNAL, NULL, 0) = 86
time([1202239389])                      = 1202239389
open("/etc/localtime", O_RDONLY)        = -1 ENOENT (No such file or directory)
open("/etc/localtime", O_RDONLY)        = -1 ENOENT (No such file or directory)
open("/etc/localtime", O_RDONLY)        = -1 ENOENT (No such file or directory)
writev(2, [{"scponly[2193]: Found \"HOME\" and "..., 72}, {"\n", 1}], 2) = 73
sendto(3, "<87>Feb  5 19:23:09 scponly[2193"..., 92, MSG_NOSIGNAL, NULL, 0) = 92
time([1202239389])                      = 1202239389
open("/etc/localtime", O_RDONLY)        = -1 ENOENT (No such file or directory)
open("/etc/localtime", O_RDONLY)        = -1 ENOENT (No such file or directory)
open("/etc/localtime", O_RDONLY)        = -1 ENOENT (No such file or directory)
writev(2, [{"scponly[2193]: Environment conta"..., 67}, {"\n", 1}], 2) = 68
sendto(3, "<87>Feb  5 19:23:09 scponly[2193"..., 87, MSG_NOSIGNAL, NULL, 0) = 87
getuid()                                = 1022
time([1202239389])                      = 1202239389
open("/etc/localtime", O_RDONLY)        = -1 ENOENT (No such file or directory)
open("/etc/localtime", O_RDONLY)        = -1 ENOENT (No such file or directory)
open("/etc/localtime", O_RDONLY)        = -1 ENOENT (No such file or directory)
writev(2, [{"scponly[2193]: set HOME environm"..., 106}, {"\n", 1}], 2) = 107
sendto(3, "<87>Feb  5 19:23:09 scponly[2193"..., 126, MSG_NOSIGNAL, NULL, 0) = 126
getuid()                                = 1022
time([1202239389])                      = 1202239389
open("/etc/localtime", O_RDONLY)        = -1 ENOENT (No such file or directory)
open("/etc/localtime", O_RDONLY)        = -1 ENOENT (No such file or directory)
open("/etc/localtime", O_RDONLY)        = -1 ENOENT (No such file or directory)
writev(2, [{"scponly[2193]: running: /usr/lib"..., 103}, {"\n", 1}], 2) = 104
sendto(3, "<86>Feb  5 19:23:09 scponly[2193"..., 123, MSG_NOSIGNAL, NULL, 0) = 123
execve("/usr/lib/sftp-server", ["/usr/lib/sftp-server"], [/* 2 vars */]) = -1 ENOENT (No such file or directory)
getuid()                                = 1022
time([1202239389])                      = 1202239389
open("/etc/localtime", O_RDONLY)        = -1 ENOENT (No such file or directory)
open("/etc/localtime", O_RDONLY)        = -1 ENOENT (No such file or directory)
open("/etc/localtime", O_RDONLY)        = -1 ENOENT (No such file or directory)
writev(2, [{"scponly[2193]: failed: /usr/lib/"..., 142}, {"\n", 1}], 2) = 143
sendto(3, "<83>Feb  5 19:23:09 scponly[2193"..., 162, MSG_NOSIGNAL, NULL, 0) = 162
open("/dev/tty", O_RDWR|O_NONBLOCK|O_NOCTTY) = -1 ENOENT (No such file or directory)
writev(2, [{"*** glibc detected *** ", 23}, {"free(): invalid pointer", 23}, {": 0x", 4}, {"0000000000505720", 16}, {" ***\n", 5}], 5) = 71
rt_sigprocmask(SIG_UNBLOCK, [ABRT], NULL, 8) = 0
tgkill(2193, 2193, SIGABRT)             = 0
--- SIGABRT (Aborted) @ 0 (0) ---


More information about the scponly mailing list