在rhel 6上使用非root用户的暴发户

时间:2016-05-23 08:44:39

标签: upstart rhel6

如何在rhel 6中以非root用户身份启动upstart脚本。我尝试了以下选项,但它没有用。

exec start-stop-daemon --start --quiet --chuid mongodb --exec $command //This works only on ubuntu

exec setuid $uid -c $command // Didn't work

exec --run-as-user $user $command // Didn't work

1 个答案:

答案 0 :(得分:0)

<head runat="server">
    <title></title>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.3/jquery.min.js"></script>
    <script type="text/javascript">
        function CheckValidInput() {
            var textLength = $("#TextBox1").val().length;

            if (textLength < 500) {
                alert("Input is empty or too short.");
                return false;
            }
            return true;
        };
    </script>
</head>
<body>
    <form runat="server">
        <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
        <asp:Button ID="Button1" runat="server" Text="Button" OnClientClick="return CheckValidInput()" OnClick="Button1_Click" />
    </form>
</body>

以上命令对我有用。这可能对其他人有帮助,因此可以发布答案。