ownership on /var/spool/sms directories incorrect
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
smstools (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
As installed out of the box on Ubuntu, the primary group of smsd is smsd. It is also member of group dialout. This makes sense because smsd needs access to modem devices, which normally are crw-rw---- for root:dialout.
As configured in /etc/default/
Smsd's spool directories (/var/spool/sms/*) are rwxrwsr-t for smsd:smsd. Thus to give a user permission to send SMS it suffices to add them to group smsd. This gives them write access to /var/spool/
So far, so good. Smsd has ownership of the outgoing directory, so can read and r(re)move the file. However, it gives the error "Cannot handle /var/spool/
As is apparent from the files in the sent and failed spools (when smsd is run with effective group smsd instead of dialout), what smsd is trying to do is to *take ownership* of the file. This however it cannot do: it is not a privileged user and its effective user nor group match the files owner or group.
There are two solutions: chown the /var/spool/sms directories to smsd:dialout (while keeping effective group dialout), or set smsd's effective group in /etc/default/
ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: smstools 3.1.15-1.2
ProcVersionSign
Uname: Linux 4.8.0-46-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.5
Architecture: amd64
CurrentDesktop: Unity
Date: Mon Apr 24 13:32:23 2017
InstallationDate: Installed on 2015-12-04 (507 days ago)
InstallationMedia: Ubuntu 15.10 "Wily Werewolf" - Release amd64 (20151021)
SourcePackage: smstools
UpgradeStatus: Upgraded to xenial on 2016-04-25 (364 days ago)
Setting smsd's effective group to 'smsd' (in /etc/default/ smstools) seems to me the better option. That way users can be given access to the smstools spool directories (by adding them to group 'smsd') without granting them access to the "raw" modems (which would happen if they were added to 'dialout').