Can't grant myself permissions to execute `rm` command as sudo The Next CEO of Stack...

How to solve a differential equation with a term to a power?

Do I need to enable Dev Hub in my PROD Org?

How do I transpose the 1st and -1th levels of an arbitrarily nested array?

Is "for causing autism in X" grammatical?

Help understanding this unsettling image of Titan, Epimetheus, and Saturn's rings?

Limits on contract work without pre-agreed price/contract (UK)

Preparing Indesign booklet with .psd graphics for print

Why is the US ranked as #45 in Press Freedom ratings, despite its extremely permissive free speech laws?

If a black hole is created from light, can this black hole then move at speed of light?

Sending manuscript to multiple publishers

In excess I'm lethal

Why do professional authors make "consistency" mistakes? And how to avoid them?

How did the Bene Gesserit know how to make a Kwisatz Haderach?

What is ( CFMCC ) on ILS approach chart?

multiple labels for a single equation

calculus parametric curve length

What was the first Unix version to run on a microcomputer?

How fast would a person need to move to trick the eye?

What happened in Rome, when the western empire "fell"?

Elegant way to replace substring in a regex with optional groups in Python?

Is micro rebar a better way to reinforce concrete than rebar?

WOW air has ceased operation, can I get my tickets refunded?

I believe this to be a fraud - hired, then asked to cash check and send cash as Bitcoin

What is the purpose of the Evocation wizard's Potent Cantrip feature?



Can't grant myself permissions to execute `rm` command as sudo



The Next CEO of Stack Overflowsudo -Hu rsyncuser rsync --progress -avz /source/path/ host.org:/destination/path/ - why does it change directory permissions?Accidentally took execute privileges off my /homeI can't run “sudo” on a certain command, because its not in the sudo path. How can I give the right permissions then?How to add flags and/or arguments to a command in the 'sudoers' filegetting error for knife bootstrap on ubuntu chef nodePermissions error when sudo-ingsu to 'superuser system' fails even when root tries it, even after passwd settingGiving postgres database user sudo permissionshow set read and write permissions for a directoryCan't Move File After Changing Permissions












0















I have a user account on my machine:



$ (whoami)
> foo_user


I've updated by /etc/sudoers file to grant myself permissions to use the rm command:



User_Alias      OPERATORS = foo_user
Cmnd_Alias RM = /bin/rm
OPERATORS ALL = RM
OPERATORS ]ALL = (ALL) ALL


However, when I try to run rm on a directory, I get a permissions denied error:



rm: /root-directory: Permission denied


What am I doing wrong?










share|improve this question



























    0















    I have a user account on my machine:



    $ (whoami)
    > foo_user


    I've updated by /etc/sudoers file to grant myself permissions to use the rm command:



    User_Alias      OPERATORS = foo_user
    Cmnd_Alias RM = /bin/rm
    OPERATORS ALL = RM
    OPERATORS ]ALL = (ALL) ALL


    However, when I try to run rm on a directory, I get a permissions denied error:



    rm: /root-directory: Permission denied


    What am I doing wrong?










    share|improve this question

























      0












      0








      0








      I have a user account on my machine:



      $ (whoami)
      > foo_user


      I've updated by /etc/sudoers file to grant myself permissions to use the rm command:



      User_Alias      OPERATORS = foo_user
      Cmnd_Alias RM = /bin/rm
      OPERATORS ALL = RM
      OPERATORS ]ALL = (ALL) ALL


      However, when I try to run rm on a directory, I get a permissions denied error:



      rm: /root-directory: Permission denied


      What am I doing wrong?










      share|improve this question














      I have a user account on my machine:



      $ (whoami)
      > foo_user


      I've updated by /etc/sudoers file to grant myself permissions to use the rm command:



      User_Alias      OPERATORS = foo_user
      Cmnd_Alias RM = /bin/rm
      OPERATORS ALL = RM
      OPERATORS ]ALL = (ALL) ALL


      However, when I try to run rm on a directory, I get a permissions denied error:



      rm: /root-directory: Permission denied


      What am I doing wrong?







      permissions sudo visudo






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 11 mins ago









      dopatramandopatraman

      1114




      1114






















          0






          active

          oldest

          votes












          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%2f1129817%2fcant-grant-myself-permissions-to-execute-rm-command-as-sudo%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















          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.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1129817%2fcant-grant-myself-permissions-to-execute-rm-command-as-sudo%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

          Why do type traits not work with types in namespace scope?What are POD types in C++?Why can templates only be...

          Will tsunami waves travel forever if there was no land?Why do tsunami waves begin with the water flowing away...

          Simple Scan not detecting my scanner (Brother DCP-7055W)Brother MFC-L2700DW printer can print, can't...