Re: 3g/4g modem access from within chroot

2019-02-08 Thread Kihaguru Gathura
Have removed the group assginment and instead did chown as follows: www# chown www:daemon /var/www/dev/cuaU2 www# chroot -u www /var/www /gathura/modem Status: 200 OK Content-type: text/html Connected to /dev/cuaU2 (speed 115200) AT+CMGF=1

Re: 3g/4g modem access from within chroot

2019-02-08 Thread Edgar Pettijohn
On Feb 8, 2019 2:21 PM, Kihaguru Gathura wrote: > > > > > Is there a /var/www/dev/cuaU2 > > Indeed this is present. created it before as follows: > > www# mkdir /var/www/dev > www# cd /var/www/dev > www# sh /dev/MAKEDEV ttyU2 > www# ls > cuaU2 ttyU2 > www# > > > > > On 2/8/19, Edgar Pettijohn

Re: 3g/4g modem access from within chroot

2019-02-08 Thread Kihaguru Gathura
Finally this works but wish to know any security implications if any. www# usermod -G dialer www www# chroot -u www /var/www /cgi-bin/modem Status: 200 OK Content-type: text/html Connected to /dev/cuaU2 (speed 115200) AT+CMGF=1 OK [EOT] www# Thanks Kihaguru. On 2/8/19, Kihaguru Gathura

Re: 3g/4g modem access from within chroot

2019-02-08 Thread Kihaguru Gathura
> > Is there a /var/www/dev/cuaU2 Indeed this is present. created it before as follows: www# mkdir /var/www/dev www# cd /var/www/dev www# sh /dev/MAKEDEV ttyU2 www# ls cuaU2 ttyU2 www# > On 2/8/19, Edgar Pettijohn wrote: > > On Feb 8, 2019 9:01 AM, Kihaguru Gathura wrote: >> >> Hi, >> >>

Re: 3g/4g modem access from within chroot

2019-02-08 Thread Edgar Pettijohn
On Feb 8, 2019 9:01 AM, Kihaguru Gathura wrote: > > Hi, > > What effective way can be used to apply permission to /dev/cuaU2 to > avoid the error below. > > > www# chroot -u www /var/www cgi-bin/modem Is there a /var/www/dev/cuaU2 > Status: 200 OK > Content-type: text/html > > cu:

Re: 3g/4g modem access from within chroot

2019-02-08 Thread Kihaguru Gathura
Hi, What effective way can be used to apply permission to /dev/cuaU2 to avoid the error below. www# chroot -u www /var/www cgi-bin/modem Status: 200 OK Content-type: text/html cu: open("/dev/cuaU2"): Permission denied Note: chown www:daemon /dev/cuaU2 has not worked. chroot is in the root

Re: 3g/4g modem access from within chroot

2018-09-11 Thread tomr
On 09/12/18 02:45, Kihaguru Gathura wrote: > Hi, > > I am able to send SMS using AT commands and C outside chroot using > code spinet below > > --- > #include > #include > #include > > #define MODEM_PATH "cu -l /dev/cuaU0 -s

3g/4g modem access from within chroot

2018-09-11 Thread Kihaguru Gathura
Hi, I am able to send SMS using AT commands and C outside chroot using code spinet below --- #include #include #include #define MODEM_PATH "cu -l /dev/cuaU0 -s 115200" int main() { FILE *out; char s[40];