You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mesos.apache.org by surdy <gi...@git.apache.org> on 2016/07/07 03:40:35 UTC

[GitHub] mesos pull request #130: Avoid 'Permission denied' error with 'sudo cat >'

GitHub user surdy opened a pull request:

    https://github.com/apache/mesos/pull/130

    Avoid 'Permission denied' error with 'sudo cat >'

    Not sure if this minor change warrants creation of a JIRA and a review board request. I will do so if required. 
    
    `sudo cat > /etc/yum.repos.d/wandisco-svn.repo << EOF` leads to `bash: /etc/yum.repos.d/wandisco-svn.repo: Permission denied` error. 
    
    `sudo bash -c 'cat > /etc/yum.repos.d/wandisco-svn.repo <<EOF` fixes the problem.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/surdy/mesos getting-started-fix

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/mesos/pull/130.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #130
    
----
commit 171e0c2ba605a1fc1d5dccc58db1dba72fccc831
Author: Harpreet Singh Gulati <ha...@mesosphere.io>
Date:   2016-07-07T03:31:36Z

    Avoid 'Permission denied' error with 'sudo cat >'

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] mesos issue #130: Avoid 'Permission denied' error with 'sudo cat >'

Posted by klueska <gi...@git.apache.org>.
Github user klueska commented on the issue:

    https://github.com/apache/mesos/pull/130
  
    Looks good to me.  To summarize the issue that he's fixing a bit more clearly. Just running:
    ```
    sudo cat > /etc/yum.repos.d/wandisco-svn.repo
    ```
    Doesn't actually do what's intended because anything after the redirect (i.e. the `>`) isn't picked up by the sudo.  We need to run `bash -c "<argument>"` instead so that sudo launches a subshell and the redirect happens inside the subshell.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Re: [GitHub] mesos pull request #130: Avoid 'Permission denied' error with 'sudo cat >'

Posted by Benjamin Mahler <bm...@apache.org>.
+Kevin

Kevin, this looks like a change to your patch below, does his change look
good to you?

commit dae2c0667c1be913d08cff57717764c6ce7a45d9
Author: Kevin Klues <kl...@gmail.com>
Date:   Thu Dec 17 06:21:02 2015 +0100

    Wrote cmd to create WANdiscoSVN file for centos.

    Previously we just told users to create this file and then add the
    contents to it. Now they can just copy and paste a single command to
    create the file and fill the contents automatically.

    Review: https://reviews.apache.org/r/41361/

On Wed, Jul 6, 2016 at 8:40 PM, surdy <gi...@git.apache.org> wrote:

> GitHub user surdy opened a pull request:
>
>     https://github.com/apache/mesos/pull/130
>
>     Avoid 'Permission denied' error with 'sudo cat >'
>
>     Not sure if this minor change warrants creation of a JIRA and a review
> board request. I will do so if required.
>
>     `sudo cat > /etc/yum.repos.d/wandisco-svn.repo << EOF` leads to `bash:
> /etc/yum.repos.d/wandisco-svn.repo: Permission denied` error.
>
>     `sudo bash -c 'cat > /etc/yum.repos.d/wandisco-svn.repo <<EOF` fixes
> the problem.
>
> You can merge this pull request into a Git repository by running:
>
>     $ git pull https://github.com/surdy/mesos getting-started-fix
>
> Alternatively you can review and apply these changes as the patch at:
>
>     https://github.com/apache/mesos/pull/130.patch
>
> To close this pull request, make a commit to your master/trunk branch
> with (at least) the following in the commit message:
>
>     This closes #130
>
> ----
> commit 171e0c2ba605a1fc1d5dccc58db1dba72fccc831
> Author: Harpreet Singh Gulati <ha...@mesosphere.io>
> Date:   2016-07-07T03:31:36Z
>
>     Avoid 'Permission denied' error with 'sudo cat >'
>
> ----
>
>
> ---
> If your project is set up for it, you can reply to this email and have your
> reply appear on GitHub as well. If your project does not have this feature
> enabled and wishes so, or if the feature is enabled but not working, please
> contact infrastructure at infrastructure@apache.org or file a JIRA ticket
> with INFRA.
> ---
>

[GitHub] mesos pull request #130: Avoid 'Permission denied' error with 'sudo cat >'

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/mesos/pull/130


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---