FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum » FUDforum Installation Issues » Permissions and maillist.php
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Permissions and maillist.php [message #25088] Wed, 25 May 2005 08:10 Go to next message
davidgordon is currently offline  davidgordon   United Kingdom
Messages: 25
Registered: May 2005
Karma: 0
Junior Member
I _had_ a working test FUDfourm installation yesterday with mailing list to forum and forum to mailing list all perfect. Then I failed to update so made a fresh install of the latest version. Now I have a working forum which sends to my mailing list but I can't get messages from the mailing list into FUDforum.

It must be something to do with the ownership and permissions of maillist.php.

To begin with I received bounce messages suggesting the maillilst.php script couldn't be run due to permission denied. So I chmod'd that to 755 then found I needed to change GLOBALS.php as well.

Now I don't get a bounce message from my mailer-daemon - but the email still doesn't reach the forum.

Who should own what?

My Server Root directory is owned by MyUserName, most of its contents are owned and group web. Directories in my Forum Data Root are owned and group web.

Or have I forgotten something else? I know I should have written everything down!

Any ideas as to what I should be looking at?

Thanks

[Updated on: Wed, 25 May 2005 08:12]

Report message to a moderator

Re: Permissions and maillist.php [message #25091 is a reply to message #25088] Wed, 25 May 2005 12:48 Go to previous messageGo to next message
davidgordon is currently offline  davidgordon   United Kingdom
Messages: 25
Registered: May 2005
Karma: 0
Junior Member
As suggested by host I need to chmod maillist.php to allow execution. So I set it to 755. Then I need to change the first line of the script to point to my #!path/to/php. I tried doing that with Pico but couldn't write to the file. So I chmod to 777 in order to make the change and then back to 755 after.

Which results in endless postings from Anonymous Coward to the forum (and my mailing list!) with no subject or body. I had to switch the forum off to stop this.

This happenned before and I just dumped FUD forum and re-installed. Setting maillist.php to 777 causes this?

How do I edit the first line of maillist.php without causing this mess?

Thanks
Re: Permissions and maillist.php [message #25094 is a reply to message #25091] Wed, 25 May 2005 13:47 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Before using mailing list import, you need to go the forum admin control panel and "unlock" the forum's files.

FUDforum Core Developer
Re: Permissions and maillist.php [message #25096 is a reply to message #25094] Wed, 25 May 2005 14:23 Go to previous messageGo to next message
davidgordon is currently offline  davidgordon   United Kingdom
Messages: 25
Registered: May 2005
Karma: 0
Junior Member
I went and unlocked, even though FUDforum said the files were unlocked. Again I chmod maillist.php to 755.

Now I am again receiving _hundreds_ of blank messages posted by Anonymous Coward.

Oh, by the way, when I unlocked the unlocked files I get loads of lines like these

ERROR: couldn't chmod "/usr/local/home/httpd/vhtdocs/MyDomain.co.uk/fudforum/errors/.mlist/1117024570_d41d8cd98f00b204e9800998ecf8427e"
ERROR: couldn't chmod "/usr/local/home/httpd/vhtdocs/MyDomain.co.uk/fudforum/errors/.mlist/1117024540_d41d8cd98f00b204e9800998ecf8427e"
ERROR: couldn't chmod "/usr/local/home/httpd/vhtdocs/MyDomain.co.uk/fudforum/errors/.mlist/1117030645_d41d8cd98f00b204e9800998ecf8427e"
ERROR: couldn't chmod "/usr/local/home/httpd/vhtdocs/MyDomain.co.uk/fudforum/errors/.mlist/1117030615_d41d8cd98f00b204e9800998ecf8427e"
ERROR: couldn't chmod "/usr/local/home/httpd/vhtdocs/MyDomain.co.uk/fudforum/errors/.mlist/1117030595_d41d8cd98f00b204e9800998ecf8427e"
ERROR: couldn't chmod "/usr/local/home/httpd/vhtdocs/MyDomain.co.uk/fudforum/errors/.mlist/1117030565_d41d8cd98f00b204e9800998ecf8427e"
ERROR: couldn't chmod "/usr/local/home/httpd/vhtdocs/MyDomain.co.uk/fudforum/errors/.mlist/1117030535_d41d8cd98f00b204e9800998ecf8427e"
ERROR: couldn't chmod "/usr/local/home/httpd/vhtdocs/MyDomain.co.uk/fudforum/errors/.mlist/error_log"
ERROR: couldn't chmod "/usr/local/home/httpd/vhtdocs/MyDomain.co.uk/fudforum/errors/.mlist/1117024582_d41d8cd98f00b204e9800998ecf8427e"
ERROR: couldn't chmod "/usr/local/home/httpd/vhtdocs/MyDomain.co.uk/fudforum/errors/.mlist/1117024552_d41d8cd98f00b204e9800998ecf8427e"


And still my messsages don't get from email to forum.
Re: Permissions and maillist.php [message #25097 is a reply to message #25096] Wed, 25 May 2005 14:27 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Looks like the forum is failing to parse the messages you are feeding, the files inside errors/.mlist/ are the complete content of the messages forum has failed to parse and the error_log contains the explanation why.
The reason those files caused warning during unlock, is because the username (of file owner) differs from that of the webserver and the webserver has no permission to chmod them.


FUDforum Core Developer
Re: Permissions and maillist.php [message #25099 is a reply to message #25088] Wed, 25 May 2005 14:43 Go to previous messageGo to next message
davidgordon is currently offline  davidgordon   United Kingdom
Messages: 25
Registered: May 2005
Karma: 0
Junior Member
The errors/.mlist/ contains many empty files - I guess that’s because Anonymous Coward's posts have no content. The error_log tells us

WARNING :: Wed, 25 May 2005 15:17:40 +0100 :: No message id :: /usr/local/home/httpd/vhtdocs/MyDomain.co.uk/fudforum/errors/.mlist/1117030660_d41d8cd98f00b204e9800998ecf8427e
WARNING :: Wed, 25 May 2005 15:17:40 +0100 :: Invalid Date :: /usr/local/home/httpd/vhtdocs/MyDomain.co.uk/fudforum/errors/.mlist/1117030660_d41d8cd98f00b204e9800998ecf8427e
WARNING :: Wed, 25 May 2005 15:17:40 +0100 :: Blank Subject :: /usr/local/home/httpd/vhtdocs/MyDomain.co.uk/fudforum/errors/.mlist/1117030660_d41d8cd98f00b204e9800998ecf8427e
WARNING :: Wed, 25 May 2005 15:17:41 +0100 :: no name or email for  :: /usr/local/home/httpd/vhtdocs/MyDomain.co.uk/fudforum/errors/.mlist/1117030661_d41d8cd98f00b204e9800998ecf8427e
WARNING :: Wed, 25 May 2005 15:17:41 +0100 :: No message id :: /usr/local/home/httpd/vhtdocs/MyDomain.co.uk/fudforum/errors/.mlist/1117030661_d41d8cd98f00b204e9800998ecf8427e
WARNING :: Wed, 25 May 2005 15:17:41 +0100 :: Invalid Date :: /usr/local/home/httpd/vhtdocs/MyDomain.co.uk/fudforum/errors/.mlist/1117030661_d41d8cd98f00b204e9800998ecf8427e
WARNING :: Wed, 25 May 2005 15:17:41 +0100 :: Blank Subject :: /usr/local/home/httpd/vhtdocs/MyDomain.co.uk/fudforum/errors/.mlist/1117030661_d41d8cd98f00b204e9800998ecf8427e


So why is FUDforum failing to parse my messages? As I said, I had a working version yesterday...

None of the files in .mlist appear to contain messages sent to FUD from email, which I would expect if the mailist.php script was running correctly. As far as I can see there are only blank messages which would suggest they are from Anonymous Coward.
Re: Permissions and maillist.php [message #25100 is a reply to message #25099] Wed, 25 May 2005 14:48 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
How are you importing messages into the forum? It seems to me that message content is not arriving @ the maillist.php script.

FUDforum Core Developer
Re: Permissions and maillist.php [message #25101 is a reply to message #25100] Wed, 25 May 2005 15:11 Go to previous messageGo to next message
davidgordon is currently offline  davidgordon   United Kingdom
Messages: 25
Registered: May 2005
Karma: 0
Junior Member
I am piping mail to the maillist.php script. (When you say importing, you mean one at a time as they are sent rather than a big batch of archive emails?)

Here is the line from my alias file


## test  Mailman mailing list
test:              "|/home/mailman/mail/mailman post test" "|/usr/local/home/httpd/vhtdocs/MyDomain.co.uk/fudforum/scripts/maillist.php 1"


My host says as far as they can see my mail is reaching the script and it is running but I haven't seen any log entries to prove that.

There's no difference in the maillist.php between 2.6.12 and 2.6.13 is there? I had 2.6.12 working on this server yesterday.
Re: Permissions and maillist.php [message #25102 is a reply to message #25101] Wed, 25 May 2005 15:18 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
The mailing list script didn't change since version 2.6.9, so it's definately not a breakage inside the script itself if it worked in 2.6.12.

You can add some debugging code to the script inside the read_data() method to see if the raw_msg property contains the raw message text. The fact that .mlist/1117030615_d41d8cd98f00b204e9800998ecf8427e are empty, implies that for one reason or another the script does get/see the message content.


FUDforum Core Developer
Re: Permissions and maillist.php [message #25103 is a reply to message #25102] Wed, 25 May 2005 15:25 Go to previous messageGo to next message
davidgordon is currently offline  davidgordon   United Kingdom
Messages: 25
Registered: May 2005
Karma: 0
Junior Member
Ilia wrote on Wed, 25 May 2005 11:18


You can add some debugging code to the script inside the read_data() method to see if the raw_msg property contains the raw message text.


I'll try that if you can give me instructions on how to. On the other hand if its something beyond my skills...
Re: Permissions and maillist.php [message #25104 is a reply to message #25103] Wed, 25 May 2005 15:34 Go to previous messageGo to next message
davidgordon is currently offline  davidgordon   United Kingdom
Messages: 25
Registered: May 2005
Karma: 0
Junior Member
And by the way, I switched my forum back on, changed the permissions of maillist to 775 again and _again_ I am receiving hundreds of blank messages from Anonymous Coward.

Should I give up now or try deleting and reinstalling again?

Re: Permissions and maillist.php [message #25105 is a reply to message #25104] Wed, 25 May 2005 15:45 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Well, you can conduct a simple test. Take any message, as save it's contents including the headers as a text file.
Then on a command line run:
cat message.txt | php maillist.php [import rule id]

and see if that message get's imported.


FUDforum Core Developer
Re: Permissions and maillist.php [message #25106 is a reply to message #25105] Wed, 25 May 2005 16:16 Go to previous messageGo to next message
davidgordon is currently offline  davidgordon   United Kingdom
Messages: 25
Registered: May 2005
Karma: 0
Junior Member
Here's what happens

[admin@MyHost scripts]$ cat test_msg.txt | php maillist.php 1
X-Powered-By: PHP/4.0.6
Content-type: text/html

Missing Forum ID Paramater


What does "X-Powered-By: PHP/4.0.6" suggest? I am running PHP 4.3 on this server. My host told me to change the path to PHP in maillist to #!/opt/php-4.3/bin/php so is there a problem with PHP?

Or the missing ID Paramater? Is that the import rule ID?

Thanks for your on-going help. I know this is the forum I want, I just need to get it running!
Re: Permissions and maillist.php [message #25107 is a reply to message #25106] Wed, 25 May 2005 16:27 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
The 1st thing you should do is follow your web hosts instructions and change the 1st line of the script to the one indicated by the hosting provider. You can then run the line I've indicated without "php" before the name.
If you still get the same error message then change the execution line to:

cat message.txt | /opt/php-4.3/bin/php -d register_argc_argv=1 maillist.php [import rule id]


FUDforum Core Developer
Re: Permissions and maillist.php [message #25108 is a reply to message #25107] Wed, 25 May 2005 17:22 Go to previous messageGo to next message
davidgordon is currently offline  davidgordon   United Kingdom
Messages: 25
Registered: May 2005
Karma: 0
Junior Member
Thanks. I had already set the correct php path.

I can't run the script without php in the line

[admin@MyHost scripts]$ cat test_msg.txt | maillist.php 1    
-bash: maillist.php: command not found


So I have run it with the line you suggest. I see no result in my command line. I don't see the message appear on the forum. But maybe it buried under all those Anonymous Coward posts which have started up again since I tried that command line.

I've had to disable the forum again. There are hundreds on blank posts going onto the forum - and to my mailing list.

Are you sure I shouldn't start again. Maybe with version 2.6.12?
Re: Permissions and maillist.php [message #25109 is a reply to message #25108] Wed, 25 May 2005 17:27 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Try running the following:

cat message.txt | /opt/php-4.3/bin/php -r ' echo file_get_contents("php://stdin"); '


FUDforum Core Developer
Re: Permissions and maillist.php [message #25112 is a reply to message #25109] Wed, 25 May 2005 19:49 Go to previous messageGo to next message
davidgordon is currently offline  davidgordon   United Kingdom
Messages: 25
Registered: May 2005
Karma: 0
Junior Member
I think I'm going to have to give up and delete/reinstall FUDforum.

I tried the last command line suggestion but there was nothing returned. Then I remembered I had the forum turned off so in case that was the problem I switched it on again. I then made a post directly into the forum. By the time I checked my mail there were 89 blank messages posted by Anonymous Coward. I went back and have turned off the forum again. By the time I turned it off 154 blank posts were made.

So it seems anytime there is any posting to the forum an unregistered user posts blank messages. I have had hundreds and hundreds if these today. My mail log is about ten times its usual size. There really is something funny going on here. All I can say is I didn't have this trouble with 2.6.12.

I am going to delete this install. Maybe I'll try the uninstall script. Is there any possibility of any files being left over so when I reinstall they will cause me problems again?
Re: Permissions and maillist.php [message #25113 is a reply to message #25112] Wed, 25 May 2005 19:59 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
If the last command I gave you didn't return anything re-installing the forum will definately not solve anything. The previous command was supposed to test if PHP you are using is able to retrieve data being piped to it. If it failed to return anything, the issue is not forum related.

FUDforum Core Developer
Re: Permissions and maillist.php [message #25116 is a reply to message #25113] Wed, 25 May 2005 20:49 Go to previous messageGo to next message
davidgordon is currently offline  davidgordon   United Kingdom
Messages: 25
Registered: May 2005
Karma: 0
Junior Member
Okay, too late I'm retrying with 2.6.12.

I still don't understand the hundreds of blank posts on the forum though.

I know that 2.6.12 worked yesterday. I will ask my host about your php test and see what they say.

Thanks for your help, better than any I've had before. As I already said FUDforum appears to do what I need and is better than the others which work with email. I really want to make it work!
Re: Permissions and maillist.php [message #25121 is a reply to message #25113] Wed, 25 May 2005 21:48 Go to previous messageGo to next message
davidgordon is currently offline  davidgordon   United Kingdom
Messages: 25
Registered: May 2005
Karma: 0
Junior Member
I'm now in 2.6.12

Here is the result of your test command line


[admin@MyHost scripts]$ cat test_msg.txt | /opt/php-4.3/bin/php -d register_argc_argv=1 maillist.php 1

Warning: fopen(/usr/local/home/httpd/vhtdocs/MyHost.co.uk/fudforum/messages/msg_1): failed to open stream: Permission denied in /usr/local/home/httpd/vhtdocs/MyHost.co.uk/fudforum/include/theme/default/imsg_edt.inc on line 512

Warning: fseek(): supplied argument is not a valid stream resource in /usr/local/home/httpd/vhtdocs/MyHost.co.uk/fudforum/include/theme/default/imsg_edt.inc on line 513

Warning: ftell(): supplied argument is not a valid stream resource in /usr/local/home/httpd/vhtdocs/MyHost.co.uk/fudforum/include/theme/default/imsg_edt.inc on line 514

Warning: fstat(): supplied argument is not a valid stream resource in /usr/local/home/httpd/vhtdocs/MyHost.co.uk/fudforum/include/core.inc on line 138

Warning: fwrite(): supplied argument is not a valid stream resource in /usr/local/home/httpd/vhtdocs/MyHost.co.uk/fudforum/include/theme/default/imsg_edt.inc on line 524

FATAL ERROR: system has ran out of disk space<br>

[admin@MyHost scripts]$ 


I have chmod 755 -R /include and that made no differnce.
Re: Permissions and maillist.php [message #25122 is a reply to message #25121] Wed, 25 May 2005 22:15 Go to previous message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
You need to unlock the forum via the admin control panel.

FUDforum Core Developer
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: I can´t install the forum
Next Topic: Time Zone won't change
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Wed Jul 03 07:29:26 GMT 2024

Total time taken to generate the page: 0.02566 seconds