Skip to content
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.

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

Double trouble :) Install failed #602

Closed
rahendri opened this issue Sep 9, 2018 · 1 comment
Closed

Double trouble :) Install failed #602

rahendri opened this issue Sep 9, 2018 · 1 comment

Comments

@rahendri
Copy link

rahendri commented Sep 9, 2018

PiVPN Issue Template

i see that the install script can download github. When running the command manualy i find a double problem. Git does not like to run as root, but /etc/.pivpn cannot be created without being root.

$ sudo git clone https://github.com/pivpn/pivpn.git /etc/.pivpn
Please run git without sudo, your regular user account is enough :)

$ git clone https://github.com/pivpn/pivpn.git /etc/.pivpn
fatal: could not create work tree dir '/etc/.pivpn'.: Permission denied

Have you searched for similar issues and solutions?

Yes,
#153
#345

Console output of curl -L install.pivpn.io | bash

curl -L https://install.pivpn.io | bash
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   178  100   178    0     0    197      0 --:--:-- --:--:-- --:--:--   197
100 51064  100 51064    0     0  46741      0  0:00:01  0:00:01 --:--:-- 46741
:::
::: You are root.
::: Verifying free disk space...
:::
::: Checking apt-get for upgraded packages.... done!
:::
::: Your system is up to date! Continuing with PiVPN installation...
::: Static IP already configured.
::: Using User: pi
:::
::: Checking for existing base files...
:::    Checking /etc/.pivpn is a repo...:::    Cloning https://github.com/pivpn/pivpn.git into /etc/.pivpn... done!
:::
::: Stopping OpenVPN service... done.
:::
::: Installing scripts to /opt/pivpn...cp: cannot stat ‘/etc/.pivpn/scripts/makeOVPN.sh’: No such file or directory
::: Install Complete...
::: Restarting services...
Synchronizing state for openvpn.service with sysvinit using update-rc.d...
Executing /usr/sbin/update-rc.d openvpn defaults
Executing /usr/sbin/update-rc.d openvpn enable
::: done.
:::
::: Installation Complete!
::: Now run 'pivpn add' to create an ovpn profile for each of your devices.
::: Run 'pivpn help' to see what else you can do!
::: It is strongly recommended you reboot after installation.
:::
::: The install log is located at: /etc/pivpn/install.log

Console Output of sudo iptables -t nat -S

-P PREROUTING ACCEPT
-P INPUT ACCEPT
-P OUTPUT ACCEPT
-P POSTROUTING ACCEPT

output of sudo netstat -uanp | grep openvpn


Have you taken any steps towards solving your issue?

 which? 

Yes, download gitrepo into /home/pi/.pivpn (im using a Pi, "Raspbian GNU/Linux 8 (jessie)") , then copy the contents into /etc/.pivpn/ and run the script again as root. That did the trick for me.

@4s3ti
Copy link
Member

4s3ti commented May 18, 2019

Non pivpn related issue.
Closing issue.

$ sudo git clone https://github.com/pivpn/pivpn.git /etc/.pivpn
Please run git without sudo, your regular user account is enough :)

Git is not to be run as root.

$ git clone https://github.com/pivpn/pivpn.git /etc/.pivpn
fatal: could not create work tree dir '/etc/.pivpn'.: Permission denied

your user doesn't have permission to write at /etc/ hence permission denied.

the proper way is stated here: https://github.com/pivpn/pivpn#installation

If you want to do it the clone way, simply git clone to your home directory, and run the script.

@4s3ti 4s3ti closed this as completed May 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants