Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Pure-FTPd log file error - cannot write to log file
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Roxxor
Apprentice
Apprentice


Joined: 04 Jun 2003
Posts: 225
Location: Stockholm, Sweden

PostPosted: Fri Jun 03, 2005 2:06 pm    Post subject: Pure-FTPd log file error - cannot write to log file Reply with quote

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
View user's profile Send private message
plut0
Apprentice
Apprentice


Joined: 21 Dec 2004
Posts: 272

PostPosted: Fri Jun 03, 2005 3:00 pm    Post subject: Reply with quote

Remove the "-H" in your MISC_OTHER and restart it.
Back to top
View user's profile Send private message
Roxxor
Apprentice
Apprentice


Joined: 04 Jun 2003
Posts: 225
Location: Stockholm, Sweden

PostPosted: Fri Jun 03, 2005 3:55 pm    Post subject: Reply with quote

I hate to say this, but it did not work. :(
Back to top
View user's profile Send private message
plut0
Apprentice
Apprentice


Joined: 21 Dec 2004
Posts: 272

PostPosted: Fri Jun 03, 2005 4:43 pm    Post subject: Reply with quote

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
View user's profile Send private message
Roxxor
Apprentice
Apprentice


Joined: 04 Jun 2003
Posts: 225
Location: Stockholm, Sweden

PostPosted: Fri Jun 03, 2005 5:21 pm    Post subject: Reply with quote

I am using syslog-ng. :(

EDIT: Now it works. Thanks.
Back to top
View user's profile Send private message
plut0
Apprentice
Apprentice


Joined: 21 Dec 2004
Posts: 272

PostPosted: Fri Jun 03, 2005 8:02 pm    Post subject: Reply with quote

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
View user's profile Send private message
Roxxor
Apprentice
Apprentice


Joined: 04 Jun 2003
Posts: 225
Location: Stockholm, Sweden

PostPosted: Sun Jun 05, 2005 1:58 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum