Permission denied in rc.local












0














Here's the contents of my /etc/rc.local



/etc/pm/power.d/99macbookair6 true
echo 0 > /sys/module/hid_apple/parameters/iso_layout
exit 0


running
service rc.local start
returns



/etc/rc.local: 14: /etc/rc.local: /etc/pm/power.d/99macbookair6: Permission denied









share|improve this question




















  • 1




    You need to run it with sudo.
    – edwinksl
    Jul 24 '16 at 2:01












  • Thanks. However, it still doesn't run correctly on startup. Edit: Nevermind.
    – half-potato
    Jul 24 '16 at 2:08


















0














Here's the contents of my /etc/rc.local



/etc/pm/power.d/99macbookair6 true
echo 0 > /sys/module/hid_apple/parameters/iso_layout
exit 0


running
service rc.local start
returns



/etc/rc.local: 14: /etc/rc.local: /etc/pm/power.d/99macbookair6: Permission denied









share|improve this question




















  • 1




    You need to run it with sudo.
    – edwinksl
    Jul 24 '16 at 2:01












  • Thanks. However, it still doesn't run correctly on startup. Edit: Nevermind.
    – half-potato
    Jul 24 '16 at 2:08
















0












0








0







Here's the contents of my /etc/rc.local



/etc/pm/power.d/99macbookair6 true
echo 0 > /sys/module/hid_apple/parameters/iso_layout
exit 0


running
service rc.local start
returns



/etc/rc.local: 14: /etc/rc.local: /etc/pm/power.d/99macbookair6: Permission denied









share|improve this question















Here's the contents of my /etc/rc.local



/etc/pm/power.d/99macbookair6 true
echo 0 > /sys/module/hid_apple/parameters/iso_layout
exit 0


running
service rc.local start
returns



/etc/rc.local: 14: /etc/rc.local: /etc/pm/power.d/99macbookair6: Permission denied






14.04 scripts services






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jul 24 '16 at 1:59









edwinksl

16.5k125385




16.5k125385










asked Jul 24 '16 at 1:57









half-potato

11316




11316








  • 1




    You need to run it with sudo.
    – edwinksl
    Jul 24 '16 at 2:01












  • Thanks. However, it still doesn't run correctly on startup. Edit: Nevermind.
    – half-potato
    Jul 24 '16 at 2:08
















  • 1




    You need to run it with sudo.
    – edwinksl
    Jul 24 '16 at 2:01












  • Thanks. However, it still doesn't run correctly on startup. Edit: Nevermind.
    – half-potato
    Jul 24 '16 at 2:08










1




1




You need to run it with sudo.
– edwinksl
Jul 24 '16 at 2:01






You need to run it with sudo.
– edwinksl
Jul 24 '16 at 2:01














Thanks. However, it still doesn't run correctly on startup. Edit: Nevermind.
– half-potato
Jul 24 '16 at 2:08






Thanks. However, it still doesn't run correctly on startup. Edit: Nevermind.
– half-potato
Jul 24 '16 at 2:08












2 Answers
2






active

oldest

votes


















1














The portion of the error message you want to look at is:



/etc/pm/power.d/99macbookair6: Permission denied


which says you do not have sufficient permission to execute /etc/pm/power.d/99macbookair6.



Even if you have some command here executable by you, you would still get permission denied error for:



echo 0 > /sys/module/hid_apple/parameters/iso_layout




In a nutshell, you can do:



service rc.local start


only when you have all entries in /etc/rc.local executable by you (and also rc.local must be readable by you obviously). Same goes for brothers of start i.e. stop, restart etc.





To get your current setup working, the most sane way is to run the command as root:



sudo service rc.local start





share|improve this answer





















  • I did chmod 777 /etc/pm/power.d/99macbookair6
    – half-potato
    Jul 26 '16 at 20:20



















0














The "Permission denied" message tells you that you lack sufficient privileges to execute the command. You need to run service rc.local start with sudo privileges:



sudo service rc.local start





share|improve this answer





















    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "89"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f802221%2fpermission-denied-in-rc-local%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1














    The portion of the error message you want to look at is:



    /etc/pm/power.d/99macbookair6: Permission denied


    which says you do not have sufficient permission to execute /etc/pm/power.d/99macbookair6.



    Even if you have some command here executable by you, you would still get permission denied error for:



    echo 0 > /sys/module/hid_apple/parameters/iso_layout




    In a nutshell, you can do:



    service rc.local start


    only when you have all entries in /etc/rc.local executable by you (and also rc.local must be readable by you obviously). Same goes for brothers of start i.e. stop, restart etc.





    To get your current setup working, the most sane way is to run the command as root:



    sudo service rc.local start





    share|improve this answer





















    • I did chmod 777 /etc/pm/power.d/99macbookair6
      – half-potato
      Jul 26 '16 at 20:20
















    1














    The portion of the error message you want to look at is:



    /etc/pm/power.d/99macbookair6: Permission denied


    which says you do not have sufficient permission to execute /etc/pm/power.d/99macbookair6.



    Even if you have some command here executable by you, you would still get permission denied error for:



    echo 0 > /sys/module/hid_apple/parameters/iso_layout




    In a nutshell, you can do:



    service rc.local start


    only when you have all entries in /etc/rc.local executable by you (and also rc.local must be readable by you obviously). Same goes for brothers of start i.e. stop, restart etc.





    To get your current setup working, the most sane way is to run the command as root:



    sudo service rc.local start





    share|improve this answer





















    • I did chmod 777 /etc/pm/power.d/99macbookair6
      – half-potato
      Jul 26 '16 at 20:20














    1












    1








    1






    The portion of the error message you want to look at is:



    /etc/pm/power.d/99macbookair6: Permission denied


    which says you do not have sufficient permission to execute /etc/pm/power.d/99macbookair6.



    Even if you have some command here executable by you, you would still get permission denied error for:



    echo 0 > /sys/module/hid_apple/parameters/iso_layout




    In a nutshell, you can do:



    service rc.local start


    only when you have all entries in /etc/rc.local executable by you (and also rc.local must be readable by you obviously). Same goes for brothers of start i.e. stop, restart etc.





    To get your current setup working, the most sane way is to run the command as root:



    sudo service rc.local start





    share|improve this answer












    The portion of the error message you want to look at is:



    /etc/pm/power.d/99macbookair6: Permission denied


    which says you do not have sufficient permission to execute /etc/pm/power.d/99macbookair6.



    Even if you have some command here executable by you, you would still get permission denied error for:



    echo 0 > /sys/module/hid_apple/parameters/iso_layout




    In a nutshell, you can do:



    service rc.local start


    only when you have all entries in /etc/rc.local executable by you (and also rc.local must be readable by you obviously). Same goes for brothers of start i.e. stop, restart etc.





    To get your current setup working, the most sane way is to run the command as root:



    sudo service rc.local start






    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Jul 24 '16 at 3:27









    heemayl

    65.8k8137211




    65.8k8137211












    • I did chmod 777 /etc/pm/power.d/99macbookair6
      – half-potato
      Jul 26 '16 at 20:20


















    • I did chmod 777 /etc/pm/power.d/99macbookair6
      – half-potato
      Jul 26 '16 at 20:20
















    I did chmod 777 /etc/pm/power.d/99macbookair6
    – half-potato
    Jul 26 '16 at 20:20




    I did chmod 777 /etc/pm/power.d/99macbookair6
    – half-potato
    Jul 26 '16 at 20:20













    0














    The "Permission denied" message tells you that you lack sufficient privileges to execute the command. You need to run service rc.local start with sudo privileges:



    sudo service rc.local start





    share|improve this answer


























      0














      The "Permission denied" message tells you that you lack sufficient privileges to execute the command. You need to run service rc.local start with sudo privileges:



      sudo service rc.local start





      share|improve this answer
























        0












        0








        0






        The "Permission denied" message tells you that you lack sufficient privileges to execute the command. You need to run service rc.local start with sudo privileges:



        sudo service rc.local start





        share|improve this answer












        The "Permission denied" message tells you that you lack sufficient privileges to execute the command. You need to run service rc.local start with sudo privileges:



        sudo service rc.local start






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Jul 24 '16 at 2:02









        edwinksl

        16.5k125385




        16.5k125385






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Ask Ubuntu!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.





            Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


            Please pay close attention to the following guidance:


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f802221%2fpermission-denied-in-rc-local%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            mysqli_query(): Empty query in /home/lucindabrummitt/public_html/blog/wp-includes/wp-db.php on line 1924

            How to change which sound is reproduced for terminal bell?

            Can I use Tabulator js library in my java Spring + Thymeleaf project?