The following forum(s) have migrated to Microsoft Q&A (Preview): Azure Virtual Machines!
Visit Microsoft Q&A (Preview) to post new questions.

Learn More

 locked
Running OpenVPN Script Cannot Access Root SFTP RRS feed

  • Question

  • Hey Im Running a OpenVPN Script On A Ubuntu 18.04 Server and I can install the script with root permissions by using " sudo su root " and that works fine but once you run the installer you need to connect to sftp to drag the ovpn file from root directory but I don't have permission and don't know how to get permission ive tried to set my permissions to all but doesn't seem to work 

    ERROR MISSION POP UP:

    Permission denied.

    Error code: 3
    Error message from server: Permission denied


    Saturday, November 23, 2019 1:32 AM

Answers

  • Hi WolfieSecurity,

    We can achieve this in many ways. I will suggest an easy solution.

    1. Login to the openVPN server. Then chnage to root using "sudo su root"
    2. Then copy the required file from the source location to /tmp/ on the same machine. command is "cp <source path>  /tmp"
    3. Then make you as the owner of that file. "chown youruser:yourgroup file.txt".  Here youruser and yourgroup will be the username which you used to login.
    4. You can check the ownership change using "ls -la /tmp"
    5. Then you can logout from the terminal and use sftp to get the file from /tmp.  Then delete the file from /tmp for security reasons.

    Try this out and let me know 

    Monday, November 25, 2019 9:21 AM

All replies

  • Hi WolfieSecurity,

    We can achieve this in many ways. I will suggest an easy solution.

    1. Login to the openVPN server. Then chnage to root using "sudo su root"
    2. Then copy the required file from the source location to /tmp/ on the same machine. command is "cp <source path>  /tmp"
    3. Then make you as the owner of that file. "chown youruser:yourgroup file.txt".  Here youruser and yourgroup will be the username which you used to login.
    4. You can check the ownership change using "ls -la /tmp"
    5. Then you can logout from the terminal and use sftp to get the file from /tmp.  Then delete the file from /tmp for security reasons.

    Try this out and let me know 

    Monday, November 25, 2019 9:21 AM
  • Hello,

    Any update on the issue?

    If the suggested response helped you resolve your issue, do click on "Mark as Answer" and "Up-Vote" for the answer that helped you for benefit of the community.

    Thanks.
    Tuesday, November 26, 2019 11:01 AM