Public bug reported: 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/smstools, smsd runs with effective group dialout. Though this makes sense, it is not strictly necessary, given that smsd is a member of group dialout. 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/sms/outgoing. Additionally, due to the setgid when they put a file there, it will be owned user:smsd. 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/sms/outgoing/somefile.sms: Access denied. Check the file and directory permissions." 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/smstools to smsd (while keeping /var/spool/sms owned smsd:smsd). ProblemType: Bug DistroRelease: Ubuntu 16.04 Package: smstools 3.1.15-1.2 ProcVersionSignature: Ubuntu 4.8.0-46.49~16.04.1-generic 4.8.17 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) ** Affects: smstools (Ubuntu) Importance: Undecided Status: New ** Tags: amd64 apport-bug xenial ** Attachment removed: "JournalErrors.txt" https://bugs.launchpad.net/ubuntu/+source/smstools/+bug/1685802/+attachment/4867336/+files/JournalErrors.txt ** Attachment removed: "Dependencies.txt" https://bugs.launchpad.net/ubuntu/+source/smstools/+bug/1685802/+attachment/4867335/+files/Dependencies.txt ** Attachment removed: "ProcEnviron.txt" https://bugs.launchpad.net/ubuntu/+source/smstools/+bug/1685802/+attachment/4867337/+files/ProcEnviron.txt -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1685802 Title: ownership on /var/spool/sms directories incorrect To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/smstools/+bug/1685802/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs