Assuming you've already checked for bugs/updates for all the packaged software you're running...
If you've not already done so, configure your server to save core files and get a stack trace from a crash using gdb, e.g. 'gdb /usr/sbin/httpd core' then enter bt at the prompt.
Its probably a very specific request which is causing the error - IIRC, both the access and error log are written after processing completes - IIRC mod_security can log requests when they arrive (including post vars) - switching this on would be a good idea until you know what causes the crash.
By default services that provide a remote shell, like ssh or telnet, or an interactive remote session for commands like sftp, allow a local user to change into any directory they have permissions for, and retrieve a copy of any file they have access to.
As a general security configuration this is unfortunate because there are many files and directories which are world-readable of necessity. For example here is me a non-root user on some remote CentOS box;
$ cd /etc
-bash-3.2$ ls -1
acpi
adjtime
aliases
...
e.g. I can access lots of stuff, that ideally you would want to restrict from some unknown user who you wish to provide local access to.
Here is me looking at all the local users configured in the /etc/passwd
file;
$ cat /etc/passwd
root:x:0:0:root:/root:/bin/bash
bin:x:1:1:bin:/bin:/sbin/nologin
...
Unix systems provide the chroot
command which allows you to reset the /
of the user to some directory in the filesystem hierarchy, where they cannot access "higher-up" files and directories.
However in your case, it would appropriate to provide a virtual chroot implemented by the remote shell service. sftp can be easily configured to restrict a local user to a specific subset of the filesystem using a configuration in the
hence in your case, you want to chroot
the adeveloper
user into the /var/www/html/website_abc
directory.
You can set a chroot directory for your user to confine them to the subdirectory /var/www/html/website_abc
like so in /etc/ssh/sshd_config
;
This stuff requires openssh-server later than 4.8?, so probably requires CentOS 6.2
Match Group sftp
ChrootDirectory %h
AllowTcpForwarding no
(not tested, see man sshd_config
to confirm syntax)
and then add those users to the sftp group;
groupadd sftp
usermod -d /var/www/html/website_abc adeveloper
usermod -G sftp adeveloper
Regarding shared keys
you should create an additional keypair for the adeveloper users, and send that to your consultant. (or alternatively, have them send your their public key and add it to the authorized_keys file for adeveloper
)
never give up your private key, thats why its called private ;-)
traditional ftp alternatives
vsftp/proftp etc also support chroot configurations, but in this modern day ssh based configurations are the normal way, and support for ftp is historical only.
there are a couple of links to tutorials here;
http://www.techrepublic.com/blog/opensource/chroot-users-with-openssh-an-easier-way-to-confine-users-to-their-home-directories/229
http://www.howtoforge.com/chrooted-ssh-sftp-tutorial-debian-lenny
Best Answer
FTP logs are largely in
xferlog
format. That follows this convention:In your case, I believe you are interpreting
10079
,a_or
andO*c
as three separate pieces of information. Those pieces of information are actually seven distinct pieces of information10079
is the file sizea
is transfer type (a
stands for an ascii transfer)_
is the special-action-flag (_
means no action taken)o
is the direction (o
is for outgoing)r
is for access mode (r
is for "real" or locally authenticated user)0
is for authentication-method (0
= none)*
is for authenticated-user-id (*
means "not available")c
is for completion-status (c
means "complete" for a complete transfer)Check out
man xferlog
for more information. Here's a web based man page forxferlog
.