baskerville / owlman

A pacman and cower wrapper
The Unlicense
25 stars 4 forks source link

Incorrect directory permissions after accidentally running as sudo #26

Closed calebstewart closed 7 years ago

calebstewart commented 7 years ago

If you mistakenly run owlman with sudo, you will get an error from makepkg stating that you cannot run makepkg as root. This makes sense, and should happen. The issue is that owlman downloads the AUR package to /tmp/owlman-aur as root. If you then try to install the same package without sudo (which is expected in this case), makepkg will fail because you do not own the directory (root does).

A simple quick fix in that situation is to just chown the specific directory (say, '/tmp/owlman-aur/google-chrome` for the google-chrome package) or to remove it completely, and then run the install again.

I think the simplest fix would be for owlman to check that you are not running as root before doing any of the wrapping.

baskerville commented 7 years ago

Thanks.