8000 Install script barfs if run as another (non root) use via su. · Issue #74 · wincent/wincent · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Install script barfs if run as another (non root) use via su. #74

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community 8000 .

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
bradwood opened this issue Feb 10, 2019 · 1 comment
Closed

Install script barfs if run as another (non root) use via su. #74

bradwood opened this issue Feb 10, 2019 · 1 comment

Comments

@bradwood
Copy link
bradwood commented Feb 10, 2019

Expected Behavior

install script runs fine in a shell which is obtained via su -l non-root-user

Actual Behavior

An error is thrown as follows:

./install: line 88: /dev/stdout: Permission denied

Steps to Reproduce the Problem

  1. create another user on your Mac (say temp)
  2. from your terminal run su -l temp
  3. run ./install

Details

This is not a huge problem, but I thought I'd log it in case anyone else has this issue. I'm building out my new dotfiles under a fresh, vanilla user on my Mac, but I'm editing and tweaking the repo from my existing account. I have a window where I am su'ed in as that other user and this is how the problem was spotted.

This stackoverflow post explains the problem.

Happy for this to be closed without a fix as I can hot-switch to the other use and log in "properly" to it. This setup was more as a convenience.

Update

The workaround is much easier than fast-switching between 2 GUI desktops. Just ssh temp@localhost once you've enabled sshd on your machine.

@wincent
Copy link
Owner
wincent commented Feb 11, 2019

This is indeed a bit edge-casey, and there is a workaround or two, like you say, but it still seems reasonable to change ./install to not use /dev/stdout.

wincent added a commit that referenced this issue Feb 11, 2019
As reported here:

    #74

There is an edge case where running in a `su -l` shell will cause file
permissions to prevent access to `/dev/stdout`, as explained here:

    https://unix.stackexchange.com/a/38580/140622

I don't expect many to people to try running this script in an `su -l`
shell, but it's easy enough to avoid the issue, so let's do that.
Sign up for free to join this conversation on GitHub. Already h 4340 ave an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
0