Keywords: Mode: All keywords (AND) |
Thu Oct 01, 2009 06:17
|
ssjoholm: Ok, So in that case the udev definition will be a good work around for current situations then.
Yes, you are correct, after the installation the smsd:smsd was the default user:group.
Regards,
Sebastian
|
Wed Sep 30, 2009 11:43
|
ssjoholm: Hi,
I did some checking.
It seems that the 'smsd' is included in the 'dialout' group, so this should not be an issue, the user/group should be fine with smsd/smsd.
My devices have 'dialout' as group,
root@wsc:/# ls -la /dev/hua*
crw-rw-rw- 1 root dialout 188, 1 2009-09-29 12:23 /dev/huawei1
crw-rw-rw- 1 root dialout 188, 2 2009-09-29 12:23 /dev/huawei2
crw-rw-rw- 1 root dialout 188, 3 2009-09-30 14:29 /dev/huawei3
root@wsc:/#
And SMSTools seems to have added smsd to the 'dialout' group during installation,
root@wsc:/# cat /etc/group | grep smsd
dialout:x:20:martti,smsd
smsd:x:116:
root@wsc:/#
So this suggest that when running with smsd:smsd is correct behaviour, and even if the smsd:dialout works fine.
There is a problem with your suggestion, or correct me if I'm wrong.
# Set permissions
if ! dpkg-statoverride --list $rundir >/dev/null 2>&1 ; then
dpkg-statoverride --update --add smsd smsd 2755 $rundir
else
# Get user/group/perms from dpkg-statoverride
# We go through this torture, because the user should be able
# to override the permissions for /v/r/smstools via
# dpkg-statoverride
USER="`dpkg-statoverride --list $rundir|cut -d' ' -f1`"
GROUP="`dpkg-statoverride --list $rundir|cut -d' ' -f2`"
PERMS="`dpkg-statoverride --list $rundir|cut -d' ' -f3`"
The '$USER' and '$GROUP' variables are not set before the "dpkg-statoverride --update --add smsd smsd 2755 $rundir" line, as you suggested to replace the existing 'smsd smsd', so this would not work. I tested it, and it did not change anything, I guess if the user/group is not defined when starting it will automatically start it with smsd/smsd.
I have not changed the ownerships of the devices, only thing I have done is to implement UDEV rules to the Huawei E196 UMTS modem,
root@wsc:/# cat /etc/udev/rules.d/20-huawei.rules
KERNEL=="ttyUSB[1-9]*", BUS=="usb", SYSFS{idVendor}=="12d1", SYSFS{idProduct}=="1001", MODE="0666", NAME="huawei%n"
root@wsc:/#
But this does not change the ownerships, to my knowledge, only access mode.
Best regards,
Sebastian
|
Mon Sep 28, 2009 10:02
|
ssjoholm: Hello,
I'm using Ubuntu 9.04 and installed SMSTools directly via apt-get, the version I'm using is 3.1.3.
Everything is working well, and the SMS is working in both directions, but I noted one thing in the logs that curious about.
When smsd is started during bootup, it is started with smsd:smsd, but then if I stop/start it (with root user) then it will be started with the smsd:dialout, so it will change group.
2009-09-28 12:14:46,2, smsd: Smsd v3.1.3 started.
2009-09-28 12:14:46,2, smsd: Running as smsd:smsd.
2009-09-28 12:42:11,2, smsd: Smsd main program is awaiting the termination of all modem handlers.
2009-09-28 12:42:11,2, GSM1: Modem handler 0 terminated.
2009-09-28 12:42:11,2, smsd: Smsd main program terminated.
2009-09-28 12:42:16,2, smsd: Smsd v3.1.3 started.
2009-09-28 12:42:16,2, smsd: Running as smsd:dialout.
At the moment I have not noted any difference in the functionality, but I'm wondering why it is changing.
I tried to add the user/group to smsd.conf with the user = smsd and group = smsd, but it did not have any affect.
Here is ps -ef after bootup;
smsd 2320 1 0 12:59 ? 00:00:00 /usr/sbin/smsd -p/var/run/smstools/smsd.pid -i/var/run/smstools/smsd.working -usmsd -gsmsd
smsd 2321 2320 0 12:59 ? 00:00:00 /usr/sbin/smsd -p/var/run/smstools/smsd.pid -i/var/run/smstools/smsd.working -usmsd -gsmsd
and here is ps -ef after stop/start of the smsd
smsd 3104 1 0 12:57 ? 00:00:00 /usr/sbin/smsd -p/var/run/smstools/smsd.pid -i/var/run/smstools/smsd.working -usmsd -gdialout
smsd 3105 3104 0 12:57 ? 00:00:00 /usr/sbin/smsd -p/var/run/smstools/smsd.pid -i/var/run/smstools/smsd.working -usmsd -gdialout
anyone have any ideas about this behavior?
Regards,
Sebastian
|