Tags:
create new tag
, view all tags

Question

To start: I'm a newbie to Linux and to TWiki. But, before you start shaking your head, I have about 20 years of programming experience. It's just all Windows based. I'm struggling through most of my Linux issues.

Now, my problem: I seem to have most everything working in my installation, except for mailnotify. I seem to have a security issue. I can get the script to start from the console, but I get this message:

RCS: failed to create file /home/tgallup/TWiki-4.1.2/data/BigDadi2/.mailnotify: Permission denied at /home/tgallup/TWiki-4.1.2/lib/TWiki/Store/RcsFile.pm line 755.

I've had all kinds of permissions problem getting TWiki installed, but I seem to have all of those fixed for my testing purposes. I'm sure I probably have tons of holes, but I'll get them fixed before we go into production mode. For now, how do I get this script to run as it is critical for our installation.

Thanks in advance for any help.

~ TomGallup

Environment

TWiki version: TWikiRelease04x01x02
TWiki plugins: SpreadSheetPlugin, CommentPlugin, EditTablePlugin, InterwikiPlugin, PreferencesPlugin, SlideShowPlugin, SmiliesPlugin, TablePlugin, TwistyPlugin
Server OS: Linux 2.6.10 (i486-linux-gnu-thread-multi)
Web server: Apache/2.0.55 (Ubuntu) PHP/5.1.2
Perl version: 5.008007 (linux)
Client OS: N/A
Web Browser: N/A
Categories: Hosting, Installation, Permissions, Security

-- TomGallup - 23 Mar 2007

Answer

ALERT! If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.

The user Apache is using and your login are different. If you try to create a file in a directory with a 755 permision owned by the Apache user you (or a script running as you) will not be able to create that file. Workaround: As root, create an empty .mailnotify in all =data/Webs directories, and change the owner to your user.

Example using tgallup as your user name:

% su
# cd /home/twiki/data
# touch */.mailnotify
# chown tgallup */.mailnotify
# exit
%

-- PeterThoeny - 23 Mar 2007

Peter:

I seem to be closer, but still not there. I had to download URI:Escape.pm to get past an error. I found and downloaded URI-1.35 and then uncompressed it into my home directory. Then, to get perl to recognize the location, I added it in with the -I parameter. So, here is my command line:

sudo perl -I /home/tgallup/TWiki-4.1.2/bin -I /home/tgallup/URI-1.35 /home/tgallup/TWiki-4.1.2/tools/mailnotify -q
I left the -q off the end so I can see the output. Here it is:

Processing BigDadi2
%MAKETEXT{"This is a subscription service to be automatically notified by e-mail when topics change in this [_1] web. This is a convenient service, so you do not have to come back and check all the time if something has changed. To subscribe, please add a bullet with your [_2] in alphabetical order to this list:" args="*<nop>%WEB%*,%TWIKIWEB%.WikiName"}%


%INCLUDE{"%TWIKIWEB%.WebChangesAlert"}%

__%MAKETEXT{"Related topics:"}%__ %TWIKIWEB%.WebChangesAlert, %MAINWEB%.%WIKIUSERSTOPIC%, %TWIKIWEB%.TWikiRegistration
   * TomGallup: *
        Last notification was at 25 Mar 2007 - 14:44
        Found change to ToolPaletteSetup
Processing CMCJDP
%MAKETEXT{"This is a subscription service to be automatically notified by e-mail when topics change in this [_1] web. This is a convenient service, so you do not have to come back and check all the time if something has changed. To subscribe, please add a bullet with your [_2] in alphabetical order to this list:" args="*<nop>%WEB%*,%TWIKIWEB%.WikiName"}%


%INCLUDE{"%TWIKIWEB%.WebChangesAlert"}%

__%MAKETEXT{"Related topics:"}%__ %TWIKIWEB%.WebChangesAlert, %MAINWEB%.%WIKIUSERSTOPIC%, %TWIKIWEB%.TWikiRegistration
   * CMCCompanyGroup: *
        Last notification was at 20 Mar 2007 - 03:11
Processing Main
This is a subscription service to be automatically notified by e-mail when topics change in this *<nop>%WEB%* web. This is a convenient service, so you do not have to come back and check all the time if something has changed. To subscribe, please add a bullet with your %TWIKIWEB%.WikiName in alphabetical order to this list:


%INCLUDE{"%TWIKIWEB%.WebChangesAlert"}%

__Related topics:__ %TWIKIWEB%.WebChangesAlert, %MAINWEB%.%WIKIUSERSTOPIC%, %TWIKIWEB%.TWikiRegistration
   * TomGallup: *
        Last notification was at 25 Mar 2007 - 07:21
Processing Sandbox

%MAKETEXT{"This is a subscription service to be automatically notified by e-mail when topics change in this [_1] web. This is a convenient service, so you do not have to come back and check all the time if something has changed. To subscribe, please add a bullet with your [_2] in alphabetical order to this list:" args="*<nop>%WEB%*,%TWIKIWEB%.WikiName"}%


%INCLUDE{"%TWIKIWEB%.WebChangesAlert"}%

__%MAKETEXT{"Related topics:"}%__ %TWIKIWEB%.WebChangesAlert, %MAINWEB%.%WIKIUSERSTOPIC%, %TWIKIWEB%.TWikiRegistration
   * TomGallup: *
        Last notification was at 25 Mar 2007 - 05:51
Processing TWiki
This is a subscription service to be automatically notified by e-mail when topics change in this *<nop>%WEB%* web. This is a convenient service, so you do not have to come back and check all the time if something has changed. To subscribe, please add a bullet with your %TWIKIWEB%.WikiName in alphabetical order to this list:


%INCLUDE{"%TWIKIWEB%.WebChangesAlert"}%

__Related topics:__ %TWIKIWEB%.WebChangesAlert, %MAINWEB%.%WIKIUSERSTOPIC%, %TWIKIWEB%.TWikiRegistration
   * TomGallup: *
        Last notification was at 25 Mar 2007 - 04:56
Processing Trash
        Trash has no subscribers
        0 change notifications
        0 change notifications
        0 change notifications
        0 change notifications
        0 change notifications

tgallup@ubuntu:~$  

I specifically went in and made a change to the first web listed right before running the command. It seems to find the change, but I never get any e-mail.

I have this in my crontab to run the command every 15 minutes, for testing:

# m h  dom mon dow   command
# Run mailnotify every 15 minutes all the time
00,15,30,45 * * * * perl -I /home/tgallup/TWiki-4.1.2/bin -I /home/tgallup/URI-1.35 /home/tgallup/TWiki-4.1.2/tools/mailnotify -q

I am getting e-mail notifications sent out when registering. I assume that script uses the same libraries/setup that mailnotify does, so it should not be a configuration issue anywhere.

What else should I look at?

-- TomGallup - 25 Mar 2007

Trying to change status to Asked just in case...

-- TomGallup - 28 Mar 2007

Check that the .changes file in each web is getting updated when you make a change to a topic.

-- CrawfordCurrie - 11 Apr 2007

Sorry, I should have come back to this and closed this. I hired a local consultant that was listed on this site, and he came over and found my problem right away. When I signed myself up, there were some privilege issues, and my personal page did not get created properly. Therefore, it could not find my e-mail address to send the messages to me. I copied the raw text from another person’s homepage and put it in mine, and that fixed the problem for about two days, then it stopped working again, but only on some webs. So, I just went into the notify topic of each of my webs and put my SMTP address in behind my TWiki name. (I could not figure out why it stopped working.) That has been working so far.

Thanks for all your help.

-- TomGallup - 12 Apr 2007

Change status to:
Edit | Attach | Watch | Print version | History: r6 < r5 < r4 < r3 < r2 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r6 - 2007-04-12 - TomGallup
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.