Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8341885
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T05:36:56+00:00 2026-06-09T05:36:56+00:00

I have an apache httpd server running python code using django framework and mod_wsgi.

  • 0

I have an apache httpd server running python code using django framework and mod_wsgi.
I my view.py i need to make a subprocess call to execute another python file which in the process needs to create some directories.

However, I am getting OSERROR 13: Permission denied no matter where I try to create the directory.

Only creating a directory in /tmp is successfull.

Can anyone guide me on how to fix this problem?

Thanks in advance!!!

EDIT:
I found the answer in serverfault.com. Here it is for reference
apache2 runs under root, but it forks processes which run under ‘www-data’ group.
So create a directory where you want to create files/directories

sudo mkdir /srv/www/writable

Change the group

sudo chgrp www-data /srv/www/writable

Grant the group write access

sudo chmod g+w /srv/www/writable

And you are done. Now you can create any files/directories in this directory using a script run by apache2

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T05:36:57+00:00Added an answer on June 9, 2026 at 5:36 am

    I found the answer in serverfault.com. Here it is for reference

    apache2 runs under root, but it forks processes which run under ‘www-data’ group. So create a directory where you want to create files/directories

    sudo mkdir /srv/www/writable
    Change the group

    sudo chgrp www-data /srv/www/writable
    Grant the group write access

    sudo chmod g+w /srv/www/writable
    And you are done. Now you can create any files/directories in this directory using a script run by apache2

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have my Apache http server running on localhost:80 and restlet server on localhost:8182,
I have configured Apache httpd to work as a forward proxy server. How can
I have one server located at example.com running apache, serving my static html files.
I have an ASP.NET application running on Apache server with mod_mono. If I have
I have a small Python web application using the Cherrypy framework. I am by
I am trying to get Apache::ASP running on OSX Lion Server. I have made
I've installed CouchDB in Ubuntu 11.10. I have an HTTPD server running (which functions
The app runs fine using django internal server however when I use apache +
I have Sventon running on port 8090 of my server under Apache Tomcat. I
I have a tomcat server configured (by mod_jk) to work through Apache Httpd server.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.