Moving Django site with Gunicorn to a new user on Ubuntu 16.04Setting up Django and Posgtresql on ubuntu“Unit gunicorn.service failed to load: No such file or directory” on Ubuntu 15.10?403 forbidden for django + gunicorn + systemd + apache?Ubuntu 16.04 - keep an x86_64 application runningWhat is the proper way to install ZooKeeper on Ubuntu 16.04 for both standalone and multi-node deployment?Systemd runs start and stop commands simultaneously on Ubuntu 18.04 - Minecraft server issues

How to plausibly write a character with a hidden skill

Why is there such a singular place for bird watching?

Is there a pattern for handling conflicting function parameters?

What does a textbook look like while you are writing it?

What benefits are there to blocking most search engines?

Sci-fi story about aliens with cells based on arsenic or nitrogen, poisoned by oxygen

Could Boris Johnson face criminal charges for illegally proroguing Parliament?

Does the US Armed Forces refuse to recruit anyone with an IQ less than 83?

Is right click on tables bad UX

Airport Security - advanced check, 4th amendment breach

Parent asking for money after I moved out

Redirect output on-the-fly - looks not possible in Linux, why?

Did Joe Biden "stop a prosecution" into his son in Ukraine? And did he brag about stopping the prosecution?

Mac no longer boots

What would the EU’s position be with respect to a United Ireland?

What is the difference between increasing volume and increasing gain?

Are there types of animals that can't make the trip to space? (physiologically)

Why is my vegetable stock bitter, but the chicken stock not?

Did the Humans find out about Gaius Baltar's role in the sabotage of the fleet?

Cancer activated by certain thoughts

How is this situation not a checkmate?

C - Learning Linked Lists, Pointer Manipulation - Store some ints, print and free memory

How does case-insensitive collation work?

Young adult short story book with one story where a woman finds a walrus suit and becomes a walrus



Moving Django site with Gunicorn to a new user on Ubuntu 16.04


Setting up Django and Posgtresql on ubuntu“Unit gunicorn.service failed to load: No such file or directory” on Ubuntu 15.10?403 forbidden for django + gunicorn + systemd + apache?Ubuntu 16.04 - keep an x86_64 application runningWhat is the proper way to install ZooKeeper on Ubuntu 16.04 for both standalone and multi-node deployment?Systemd runs start and stop commands simultaneously on Ubuntu 18.04 - Minecraft server issues






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty
margin-bottom:0;









0















I was handed a broken Django server for the 2019 high school cyber defense competition, and I am having a bit of trouble moving it out of the root directory to prevent red team from executing scripts through Django as root.



What I have tried:
I tried just moving it to my safer Admin folder (I am thinking about making a user with no sudo access and dropping it there i'd also love an opinion on whether that would work) I just did the mv /dir /home/myUser/Django to try and move it. I then entered the venv environment and tried to start it with python3 manage.py runserver 0.0.0.0:80 but it kept giving an error in the manage.py file. So I checked it out and it was pointing to a parenthesis which is odd.



Then I remebered that there was a systemd service for the sole purpose of keeping the server running. So I stopped it, and then changed the path and reloaded the daemon and started it back up. It said active and running but that also didn't work. From what I can tell the systemd service was starting it through Gunicorn which is something I have never used.



My final questions:
Are there any steps I missed? What do I need to do to make this all work? Does Gunicorn complicate this or add any more steps?










share|improve this question
































    0















    I was handed a broken Django server for the 2019 high school cyber defense competition, and I am having a bit of trouble moving it out of the root directory to prevent red team from executing scripts through Django as root.



    What I have tried:
    I tried just moving it to my safer Admin folder (I am thinking about making a user with no sudo access and dropping it there i'd also love an opinion on whether that would work) I just did the mv /dir /home/myUser/Django to try and move it. I then entered the venv environment and tried to start it with python3 manage.py runserver 0.0.0.0:80 but it kept giving an error in the manage.py file. So I checked it out and it was pointing to a parenthesis which is odd.



    Then I remebered that there was a systemd service for the sole purpose of keeping the server running. So I stopped it, and then changed the path and reloaded the daemon and started it back up. It said active and running but that also didn't work. From what I can tell the systemd service was starting it through Gunicorn which is something I have never used.



    My final questions:
    Are there any steps I missed? What do I need to do to make this all work? Does Gunicorn complicate this or add any more steps?










    share|improve this question




























      0












      0








      0


      0






      I was handed a broken Django server for the 2019 high school cyber defense competition, and I am having a bit of trouble moving it out of the root directory to prevent red team from executing scripts through Django as root.



      What I have tried:
      I tried just moving it to my safer Admin folder (I am thinking about making a user with no sudo access and dropping it there i'd also love an opinion on whether that would work) I just did the mv /dir /home/myUser/Django to try and move it. I then entered the venv environment and tried to start it with python3 manage.py runserver 0.0.0.0:80 but it kept giving an error in the manage.py file. So I checked it out and it was pointing to a parenthesis which is odd.



      Then I remebered that there was a systemd service for the sole purpose of keeping the server running. So I stopped it, and then changed the path and reloaded the daemon and started it back up. It said active and running but that also didn't work. From what I can tell the systemd service was starting it through Gunicorn which is something I have never used.



      My final questions:
      Are there any steps I missed? What do I need to do to make this all work? Does Gunicorn complicate this or add any more steps?










      share|improve this question
















      I was handed a broken Django server for the 2019 high school cyber defense competition, and I am having a bit of trouble moving it out of the root directory to prevent red team from executing scripts through Django as root.



      What I have tried:
      I tried just moving it to my safer Admin folder (I am thinking about making a user with no sudo access and dropping it there i'd also love an opinion on whether that would work) I just did the mv /dir /home/myUser/Django to try and move it. I then entered the venv environment and tried to start it with python3 manage.py runserver 0.0.0.0:80 but it kept giving an error in the manage.py file. So I checked it out and it was pointing to a parenthesis which is odd.



      Then I remebered that there was a systemd service for the sole purpose of keeping the server running. So I stopped it, and then changed the path and reloaded the daemon and started it back up. It said active and running but that also didn't work. From what I can tell the systemd service was starting it through Gunicorn which is something I have never used.



      My final questions:
      Are there any steps I missed? What do I need to do to make this all work? Does Gunicorn complicate this or add any more steps?







      server python webserver webapps django






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Apr 16 at 13:33







      Hunter

















      asked Apr 15 at 23:18









      HunterHunter

      63 bronze badges




      63 bronze badges























          0






          active

          oldest

          votes













          Your Answer








          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "89"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );














          draft saved

          draft discarded
















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1134210%2fmoving-django-site-with-gunicorn-to-a-new-user-on-ubuntu-16-04%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















          draft saved

          draft discarded















































          Thanks for contributing an answer to Ask Ubuntu!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1134210%2fmoving-django-site-with-gunicorn-to-a-new-user-on-ubuntu-16-04%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Tamil (spriik) Luke uk diar | Nawigatjuun

          Align equal signs while including text over equalitiesAMS align: left aligned text/math plus multicolumn alignmentMultiple alignmentsAligning equations in multiple placesNumbering and aligning an equation with multiple columnsHow to align one equation with another multline equationUsing \ in environments inside the begintabularxNumber equations and preserving alignment of equal signsHow can I align equations to the left and to the right?Double equation alignment problem within align enviromentAligned within align: Why are they right-aligned?

          Training a classifier when some of the features are unknownWhy does Gradient Boosting regression predict negative values when there are no negative y-values in my training set?How to improve an existing (trained) classifier?What is effect when I set up some self defined predisctor variables?Why Matlab neural network classification returns decimal values on prediction dataset?Fitting and transforming text data in training, testing, and validation setsHow to quantify the performance of the classifier (multi-class SVM) using the test data?How do I control for some patients providing multiple samples in my training data?Training and Test setTraining a convolutional neural network for image denoising in MatlabShouldn't an autoencoder with #(neurons in hidden layer) = #(neurons in input layer) be “perfect”?