Strange date/time stamp in pure-ftpd logs

Richard G

Verified User
Joined
Jul 6, 2008
Messages
12,558
Location
Maastricht
We have pure-ftpd running on a custombuild 1.2 server with php-cgi and I just checked the pure-ftpd logfiles.

The datestamp is in a strange format:
1331941597 4f63d0c4.58a5 username 84.30.xxx.xxx U 307155 0 /home/username/domains.... etc.

Is there a way to fix this so normal date and time is displayed?
I might change pure-ftpd.conf but since the config is not called by DA this will probably not work.
 
Try it; most likely it'll work if the configuration file has an option for changing the date/time representation. Logging isn't handled by DirectAdmin; it's handled by the underlying OS, and the log contents are controlled by the configuration.

Jeff
 
As I said, config is not called by DA.
Changing the configuration will have no effect because pure-ftpd is called by commandline in the initscript instead of via the config.
OPTIONS="-B -A -C 4 -E -H -k 95 -L 2000:8 -O stats:${LOG} -l puredb:${DB} -p 35000:35999 -u 100 -U 133:022 -w -Z"
OPTIONS="${OPTIONS} -Y 1 -J HIGH:MEDIUM:+TLSv1:!SSLv2:+SSLv3"
I wonder why proftpd is called via the config and pure-ftpd is called via commandline, because it's not that difficult to make some default to be used with DA.
 
Hello,

Looking at the parsing code in the tally in DA, the log format you've pasted is correct for pure-ftpd. That log will need to stay as it is, else DA won't be able to read it.

Doing some quick documentation reading, add the compile option to theconfigure/pureftpd/configure.pureftpd (copy it to custom/pureftpd/configure.pureftpd):
Code:
--with-altlog=xferlog:/var/log/somelog.log
keeping in mind that I've not tested it, and I'm not 100% sure on the syntax.

John
 
Thank you John.
I did not know that I could put up custom compile code too. Cool! When I ran it at home I always used the --with-everything option so I would never miss anything if needed.
The custom compile option will fix my question for sure!

Is there a reason that in opposite to Proftpd the config for pure-ftpd is not being used?
 
You're welcome to change it however you'd like.
I believe it was just a design choice when testing, but changing it to use a .conf file won't hurt anything (just need to update the boot script to specify the conf, and remove the options)
Just make sure to add the existing options into the conf file (same db file, same log, same format.. then add your extra log, etc).

John
 
Yep I know that this is a possibility, I just wondered why it was done.
Maybe in the future it can be conf by default.

Thanks for your quick answers!
 
Hello,

Reason is here:
http://download.pureftpd.org/pub/pure-ftpd/doc/README.Configuration-File

it gets a bit more messy than other services, with regards to config files.
Requires a seperate perl wrapper to parse the config, then make a call to the program with the command line anyway.
Although perl is usually present on all system, having this extra level of complexity was rather extreme, vs all other services which has the normal parser built right in to the binaries (it's really not that difficult to do, and it really doesn't add much overhead.. not sure why the author is opposed to it)

We could look at changing it should enough people want it.

John
 
Requires a seperate perl wrapper to parse the config, then make a call to the program with the command line anyway.
You're quite correct there. I forgot about that because indeed on most systems perl is present.
However, there are also systems where it isn't and I now understand the benefit for you to call it via commandline. Seems indeed a bit more stable way to implement on more systems.

Thanks for the explanation! I think due to the way it's called, we can better leave it the way it is.
 
People

We have pure-ftpd running on a custombuild 1.2 server with php-cgi and I just checked the pure-ftpd logfiles.

The datestamp is in a strange format:


Is there a way to fix this so normal date and time is displayed?
I might change pure-ftpd.conf but since the config is not called by DA this will probably not work.

People, since this page is first searchable page by the google from past 2012 you need to pay attention and correctly answer on question what the ***** "1331941597" means in log above.
The answer is:
Look:
<Bold> This is epoch </Bold>
You can convert this idiotic format to normal on this site: https://www.epochconverter.com/
 
you need to pay attention and correctly answer on question what the ***** "1331941597" means in log above.
You might need to pay attention to the question and the answer. Because this was -not- the question! And also not the answer.
And the question -was- answered correctly by DA support. :)

However, maybe some people are interested that it's called epoch, so thank you for stating that after 5 years.
 
Considering it's his first and only post, probably need to do better google search and learn to read everything before flaming :D
 
Back
Top