SMS Server Tools 3
This site is hosted by Kekekasvi.com
 Menu
Basic information:
Additional information:
Support:
Get SMS Server Tools 3:
Additional Options

 Sponsored links

 Search
Custom Search

 Visitor locations
 
 SMS Server Tools 3 Community
Welcome, Guest. Please login or register. Fri Mar 29, 2024 07:05
SMSTools3 Community » Help and support Bottom

[answered] Empty folders, always pending!

  This topic is locked

Page:  1

Author Post
Member
Registered:
Apr 2011
Location: Viseu / Viseu / Portugal, Portugal
Operating system name and version: Elastix 2.0 - CENTOS
Version of smsd: 3.1.14
Smsd installed from: from howtoforge following tutorial
Name and model of a modem / phone: Huawei E220
Interface:USB

Hi and thanks for your efforts! If you could help me please! All i need is to see messages in playsms.
I think that perhaps i didn't fail any test!
I can send from playsms page! After a few seconds i can see the sms in my phone, but still pending on playsms webpage!

I can receive on the modem! And eg: i can stop the service, send one sms to the modem number. It receives, says delivered in my phone, and when i start the service, i can see in the log that it is stored there!

NOTE: i've erased proposely in the log the phone number, for privacy!

Here is my smsd.conf


_________________________________________________

No smstools.log is or was created!

Here my playsms.conf
PLAYSMS_PATH=/var/www/html/playsms
PLAYSMS_BIN=/usr/local/bin
PLAYSMS_SMSD=/usr/sbin
PLAYSMS_LOG=/var/log/playsms
PLAYSMS_SPOOL=/var/spool/sms
__________________________________________

here is the ls command that i've seen on other searches as you asked!
[root@srv ~]# ls -ltrR /var/spool/sms


______________________________________________________


As you can see the message is here (/var/log/smsd.log):




« Last edit by MareAlta on Tue May 17, 2011 17:00, 156 months ago. »
Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
The logfile is defined in the init.d script (sms3) as a command line argument, and it overrides the setting in smsd.conf.

When running smsd as root, there is no reason to move the logfile. And when running smsd as an unprivileged user, which on many systems is recommended, user settings are usually done in the init.d script. In this case the directory /var/run/xxx should also be defined, and therefore the setting for logfile is done in that script too.

I do not know about tutorial you mentioned, but I would be very careful with tutorials which recommend to make almost everything world-writable.

As playSMS needs to write files to outgoing directory, and it needs to read and wants to delete files in sent, failed and incoming directories, you should give appropriate permissions to it using the group settings, which in your case, as running as root, could be:

chmod 775 outgoing, sent, failed and incoming directories.
chown root:apache those four directories.

In sent directory you have some files which are moved to it by smsd after the sending was successful. If playSMS still says that those messages are pending, you probably do not have playsmsd running. Try pgrep playsmsd, and if it's not running, start it with playsmsd_start.

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
See also this topic: [fix] init.d script sms3 conflicts with playsmsd, you need to upgrade the /etc/init.d/sms3 script.

Member
Registered:
Apr 2011
Location: Viseu / Viseu / Portugal, Portugal
Topic owner
At first, let me thank you for your atention to my problem!

pgrep playsmsd was not running! So after this i'v loged in, and outgoing messages was "sent"!

After making changes with chmod and Chown comands, tryed to send an sms and the result was
Fail to sent SMS (to: `35193634xxxx`) (xxx was me that changed now).
Try to change all to 777 again? I think? when it was 777, all messages went to qeue correctly!

The incoming folder stills empty!

By the way, is it possible to help me (what to do) with the new script init.d or send me a link with some instructions!
An final note: Tutorial was this: http://www.howtoforge.com/installation-of-playsms-and-sms-server-tools-3-on-debian-server

Thankyou once more for your help


« Last edit by MareAlta on Tue May 17, 2011 19:19, 156 months ago. »
Member
Registered:
Apr 2011
Location: Viseu / Viseu / Portugal, Portugal
Topic owner
Ok! I've read and understand the script, and updated.

About the chmod and chown, had to put back to the old situation!

Now sms are going to queue and playsms sends it (or smstools)!

Still sending to the modem and nothing apear on the incoming folder!
But in the the log apears the message "moved" to incoming.

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
The sms3 script needs to be upgraded, because the old one stops playsmsd too when smsd is stopped. Other remarkable things are not changed, so no instructions or links are not needed. Upgrade the script now, if not already done.

That tutorial does not recommend to use 777, but it assumes that the whole spooler of smsd should be owned by www service, and smsd runs as a root. In your case, if playSMS is the only one application which sends SMS, those permissions are okay.

Group permissions should work, but probably in your case the www user is not apache, as I assume.

Do the following:

- stop the smsd, with the new script. We need to see the outgoing file, before it is handled by smsd.
- chmod outgoing directory to 777
- send one SMS with playSMS
- in the outgoing directory, check who owns the file

Assuming that the owner is someone else than apache, apply chown root:<that user> to these four directories.

Then restart smsd, and after a while the SMS is sent and playSMS should see it as sent.

Member
Registered:
Apr 2011
Location: Viseu / Viseu / Portugal, Portugal
Topic owner
Ok! After doing that i've sended a message to my cellphone and this is the result!



In playsms webpage:
11. 2011-05-17 23:02:37 35193634xxxx
(Rui Silva) ddffdffddfdf - playSMS Sent (green)
_________________________________________

After this i've sended an sms from my cell phone to playsms.
I've received the delivery report on my cell phone!
And i saw the log - i'm monitoring with tail command.
But nohting apears on incoming folder!
My doubt is: Could it be on "Checked" folder? It is with "root root" and not "root apache"!

Thanks for all the help, trying to solve this problem!
Best Regards

Member
Registered:
Apr 2011
Location: Viseu / Viseu / Portugal, Portugal
Topic owner
Ok! Now i did one thing. (i'm trying all possibilities). I've chaged chown to root:playsms in all folders

i've watched in incoming folder on playsms and it was empty!
BUT, on administration folder, ALL INCOMING SMS, there they are.


What to do? It means that it didn't know where to handle the sms? Is that?
How could i fix this?

Best Regards

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
MareAlta wrote
Ok! Now i did one thing. (i'm trying all possibilities). I've chaged chown to root:playsms in all folders

Instead of trying "all possibilities", try those which were mentioned in the post #2 ;). With 777 you are giving permissions to ALL users to do ANYTHING in the spooler of smsd, This is not what is usually meant to do. If all users (outside the playSMS) should be able to send SMS, and you do not want to set group permissions for users, just set outgoing to 777 but not all directories. For more on this, open http://www.google.com and search "unix permissions", or "linux permissions" (without quotation marks).

MareAlta wrote
What to do? It means that it didn't know where to handle the sms? Is that?
How could i fix this?

Yes, messages are unhandled because they were not targeted to any specific user. For more on this, open http://www.playsms.org.

Member
Registered:
Apr 2011
Location: Viseu / Viseu / Portugal, Portugal
Topic owner
Keke, Thank you for all your advices!

It has been very greatfull, because any post that you reply, i'm allways learning sometinhg new!

Thank you once more for your kindly help ;)!

As soon as a get solved this problem - unhandled - i'll post here!

by the way, i'm considering translate the program to Protuguese language!

If could orientate me about that, i'm very interested to help translating!

Best Regards
MareAlta

  This topic is locked

Page:  1

SMSTools3 Community » Help and support Top

 
Time in this board is UTC.  

Privacy Policy   SMS Server Tools 3 Copyright © Keijo Kasvi.