View previous topic :: View next topic |
Author |
Message |
Roxxor Apprentice
Joined: 04 Jun 2003 Posts: 225 Location: Stockholm, Sweden
|
Posted: Fri Jun 03, 2005 2:06 pm Post subject: Pure-FTPd log file error - cannot write to log file |
|
|
I cannot get my log file working.
This is my pure-ftpd config file:
Code: |
# Config file for /etc/init.d/pure-ftpd
##Comment variables out to disable its features, or change the values in it... ##
## This variable must be uncommented in order for the server to start ##
IS_CONFIGURED="yes"
## FTP Server,Port (separated by comma) ##
## If you prefer host names over IP addresses, it's your choice :
## SERVER="-S ftp.rtchat.com,21"
## IPv6 addresses are supported.
## !!! WARNING !!!
## Using an invalid IP will result in server not starting and reporting
## a good start. Work is being done to solve that in:
## http://bugs.gentoo.org/show_bug.cgi?id=75861
#SERVER="-S 192.168.0.1,21"
SERVER="-S 21"
## Number of simultaneous connections in total, and per ip ##
MAX_CONN="-c 3"
#MAX_CONN_IP="-C 10"
## Start daemonized in background ##
DAEMON="-B"
## Don't allow uploads if the partition is more full then this var ##
DISK_FULL="-k 90%"
## If your FTP server is behind a NAT box, uncomment this ##
#USE_NAT="-N"
## Authentication (others are 'pam', ...)##
## Further infos in the README file.
AUTH="-l unix"
#AUTH="-l mysql:/etc/pureftpd-mysql.conf"
## Change the maximum idle time. (in minutes. default 15)
#TIMEOUT="-I <timeout>'"
## Use that facility for syslog logging. It defaults to 'ftp'
## Logging can be disabled with '-f none' .
#LOG="-f facility"
## Misc. Others ##
#MISC_OTHER="-A -x -j -R -B"
MISC_OTHER="-A -x -j -R -T 300 -O clf:/var/log/pureftpd.log -H"
#
# Use these inside $MISC_OTHER
# More can be found on "http://pureftpd.sourceforge.net/README"
#
# -A [ chroot() everyone, but root ]
# -e [ Only allow anonymous users ]
# -E [ Only allow authenticated users. Anonymous logins are prohibited. ]
# -i [ Disallow upload for anonymous users, whatever directory perms are ]
# -j [ If the home directory of a user doesn't exist, auto-create it ]
# -M [ Allow anonymous users to create directories. ]
# -R [ Disallow users (even non-anonymous ones) usage of the CHMOD command ]
# -x [ Authenticated users can read/write files beginning with a dot ('.')
# Anonymous users can't, for security reasons ]
# -X [ Users can't write/read files and directories starting with a dot ('.') ]
# -D [ List files beginning with a dot ('.') even when the client doesn't
# append the '-a' option to the list command. A workaround for badly
# configured FTP clients. ]
# -G [ Disallow renaming. ]
# -d [ Send various debugging messages to the syslog. ONLY for DEBUG ]
# -F <fortune file> [ Display a fortune cookie on login. Check the README file ]
# -H [ By default, fully-qualified host names are logged. The '-H' flag avoids host names resolution. ]
|
As you can see I have the line
MISC_OTHER="-A -x -j -R -T 300 -O clf:/var/log/pureftpd.log -H".
I have also created a file called pureftpd.log in /var/log/
Then I run
Code: |
chmod a+rw /var/log/pureftpd.log
|
But it stil does not work.
Why?
Ps. I do have restarted pure-ftpd a several times. Ds. |
|
Back to top |
|
|
plut0 Apprentice
Joined: 21 Dec 2004 Posts: 272
|
Posted: Fri Jun 03, 2005 3:00 pm Post subject: |
|
|
Remove the "-H" in your MISC_OTHER and restart it. |
|
Back to top |
|
|
Roxxor Apprentice
Joined: 04 Jun 2003 Posts: 225 Location: Stockholm, Sweden
|
Posted: Fri Jun 03, 2005 3:55 pm Post subject: |
|
|
I hate to say this, but it did not work. |
|
Back to top |
|
|
plut0 Apprentice
Joined: 21 Dec 2004 Posts: 272
|
Posted: Fri Jun 03, 2005 4:43 pm Post subject: |
|
|
I can't seem to get it working with the "-O" flag either. Hopefully someone else can be more help on this. I just use syslog for logging. |
|
Back to top |
|
|
Roxxor Apprentice
Joined: 04 Jun 2003 Posts: 225 Location: Stockholm, Sweden
|
Posted: Fri Jun 03, 2005 5:21 pm Post subject: |
|
|
I am using syslog-ng.
EDIT: Now it works. Thanks. |
|
Back to top |
|
|
plut0 Apprentice
Joined: 21 Dec 2004 Posts: 272
|
Posted: Fri Jun 03, 2005 8:02 pm Post subject: |
|
|
If you're using syslog-ng you don't need to pass "-O"
Setting up logging with syslog-ng is in /etc/syslog-ng/syslog-ng.conf. Default facility is "ftp". |
|
Back to top |
|
|
Roxxor Apprentice
Joined: 04 Jun 2003 Posts: 225 Location: Stockholm, Sweden
|
Posted: Sun Jun 05, 2005 1:58 pm Post subject: |
|
|
Is it possible to log all connected users?
Now I just can see what they have uploaded and downloaded, but I also want to see if they just have connected to my server.
Is it possible? How?
I have this line set now in (etc/conf.d/pure-ftpd:
Code: |
MISC_OTHER="-A -x -j -R -T 300 -O clf:/var/log/pureftpd.log
|
|
|
Back to top |
|
|
|