Suggestion from Clint is to enhance pre- and post- syntax such that the setuid and setgid stanzas can also appear in a pre-post section. If they do, these values are used rather than the "globally" specified setuid/setgid value. For example:
________________________ # this is the "global" value for setuid. If not overriden, all job processes will run as user 'foo' setuid foo pre-start setuid bar script echo this runs as user 'bar' end script post-stop setuid baz exec echo this runs as user 'baz' exec echo I run as user 'foo' ________________________ This is a very elegant solution to the problem. For now however, it is possible to work around the limitation by creating a separate .conf file to handle the pre/post conditions whilst running as root. ** Changed in: upstart (Ubuntu) Importance: Undecided => Low ** Changed in: upstart Importance: Undecided => Low -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/911207 Title: upstart 1.4: setuid/setguid apply to ALL scripts To manage notifications about this bug go to: https://bugs.launchpad.net/upstart/+bug/911207/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs