[NOTIFY] : SWUPDATE failed [0] ERROR : Error creating IPC socket /tmp/swupdateprog, exiting.

836 views
Skip to first unread message

richar...@keysight.com

unread,
Oct 13, 2017, 10:44:43 AM10/13/17
to swup...@googlegroups.com
I am running an embedded os with ro file system
I have a user defined which is in groups 'disk user'

I would like this user to be able to run 'swupdate' but I get an error


[NOTIFY] : SWUPDATE failed [0] ERROR : Error creating IPC socket /tmp/swupdateprog, exiting.

This works fine if I am logged in as root or use 'su' to run.

Being new at linux,
- is the above error normal for swupdate or is there a 'bug'?
- if normal
-Can I set some permissions and/or add my user to a particular group?

Thanks

Richard C. Allen
Keysight Technologies
richar...@Keysight.com


Stefano Babic

unread,
Oct 13, 2017, 5:21:17 PM10/13/17
to richar...@keysight.com, swup...@googlegroups.com
Hi Richard,

On 13/10/2017 16:44, richar...@keysight.com wrote:
> I am running an embedded os with ro file system
> I have a user defined which is in groups 'disk user'
>
> I would like this user to be able to run 'swupdate' but I get an error
>
>
> [NOTIFY] : SWUPDATE failed [0] ERROR : Error creating IPC socket /tmp/swupdateprog, exiting.
>
> This works fine if I am logged in as root or use 'su' to run.
>
> Being new at linux,
> - is the above error normal for swupdate or is there a 'bug'?

Why should be an error in SWUpdate if permissions are not set ?

SWUpdate has no permissions to create a UDS in /tmp.

> - if normal
> -Can I set some permissions and/or add my user to a particular group?

You can set permission - anyway, SWUpdate requires some permissions to
do the job. If it must write into raw device, it must have permissions
to do this.


Best regards,
Stefano Babic

--
=====================================================================
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=====================================================================

richar...@keysight.com

unread,
Oct 14, 2017, 10:55:22 AM10/14/17
to sba...@denx.de, swup...@googlegroups.com
Thanks for the prompt reply.
I am trying to set permissions on swupdate so an non-root user can run swupdate successfully.
Do you happen to know how one would do this?

Richard Allen

Stefano Babic

unread,
Oct 14, 2017, 1:54:43 PM10/14/17
to richar...@keysight.com, sba...@denx.de, swup...@googlegroups.com
Hi Richard,

On 14/10/2017 16:55, richar...@keysight.com wrote:
> Thanks for the prompt reply.
> I am trying to set permissions on swupdate

There are recent patches that let systemd to create the sockets and
SWUpdate simply use them. You can also define the path for these
sockets, check with make menuconfig.

> so an non-root user can run swupdate successfully.
> Do you happen to know how one would do this?

The thing is what SWUpdate must do. SWUpdate is already split into main
process (the installer) and interface processes that can run with lower
privileges. However, if SWUpdate must access to the hardware, it must
have enough rights for it.

Best regards,
Stefano Babic

richar...@keysight.com

unread,
Oct 14, 2017, 5:40:31 PM10/14/17
to sba...@denx.de, swup...@googlegroups.com
Thanks, will look into it..
See
=======
commit 942b6a654a03789ac109f411df90034f7c639a1f
Author: Ayoub Zaki <ayoub...@embexus.com>
Date: Mon Sep 25 21:23:02 2017 +0200

Add systemd swupdate mechanism for usb media

In case of using swupdate with systemd this add the possibility of
updating a device automatically when inserting an usb media containing
a valid update artifact:

-swupdate-usb.rules: trigger swupdate-usb@ service by passing device name as argument

-swupdate-progress.service: start progress tool that monitor update status
and reboot the device if update is succesful

-swupdate-usb@.service: mount the media device, pass the update artficat if existing
on usb media via client tool. In case of failure the media is umounted

Note that swupdate-usb@.service unit has a require dependency on swupdate-progress.service
which means the the latter is started first.

Signed-off-by: Ayoub Zaki <ayoub...@embexus.com>
===

Really like this concept

I am hoping it works for the older initV also ,we are using swupdate from an ram based system, and systemd brings in about 10 Megs more that systemV (at least for us.)

(Trying to minimize the size of the rootfs that is packaged )

cheers
Reply all
Reply to author
Forward
0 new messages