LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-09-2011, 12:37 PM   #1
welshdemon
LQ Newbie
 
Registered: Oct 2009
Posts: 13

Rep: Reputation: 0
Pure-authd not passing variables to pure-ftpd


Hi, after days of struggling, I hope somebody might have an idea.

I have set up pure-authd and pure-ftpd. They are both running, I have created the socket etc.

In my authentication module (a php script) for testing purposes I have done a vardump in to a file, and have realised that pure-authd is not passing on any variables (username, password of the current person trying to log in via ftp) to the PHP script.

Would anybody have any ideas why this is?

I am sure the authentication module is working (have tested it vigorously on the command line), but after 10 hours wondering why it wouldnt work and messing about with the script, I have realised that the variables were never even getting in to the script in the first place! DOH!!!

I am running the processes such as this:

pure-authd -s /var/run/ftpd.sock -r /usr/bin/ftpauth.php &

/usr/sbin/pure-config.pl /etc/pure-ftpd/pure-ftpd.conf

(pure-ftpd.conf has this line in it and enabled)
ExtAuth /var/run/ftpd.sock

Everything seems as if it is working other than this. For instance, when testing the setup with a very basic auth module which doesnt require a username or password (the basic module just passes "auth_ok:1" to pure-ftpd and the user is then logged in), I can log in to the FTP server fine.

But like I say, a vardump ($argv) on my proper PHP authentication script would suggest that no username or password are being passed to it.

If somebody has any idea I would be very grateful!

Regards,

Paul.
 
Old 02-11-2011, 04:47 PM   #2
welshdemon
LQ Newbie
 
Registered: Oct 2009
Posts: 13

Original Poster
Rep: Reputation: 0
Fixed.

As a newbie to PHP and Linux. I was trying to use getopt and argv and various other methods to get the variables in to the PHP script.

It turns out I had to use $_env in my PHP script.

$AUTHD_ACCOUNT = $_ENV["AUTHD_ACCOUNT"];

I am posting this in case anybody ever gets stuck and stumbles across this thread from google.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
pure-ftpd-mysql activates pure-ftpd zvikamer Linux - Software 2 03-01-2008 12:11 PM
Pure-ftpd olva Linux - General 0 05-15-2006 05:57 AM
pure-ftpd help. Drolith Linux - Software 3 11-13-2005 01:50 PM
pure-ftpd help hongman Linux - Software 16 04-06-2005 11:18 AM
Pure-ftpd zaicheke Linux - Software 2 08-19-2004 06:20 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:03 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration