Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

512
Vistas
I have Deployed My Django App in apache server . All the static files are getting served properly but its not accepting media files from Form Input

While Submitting a form having media input its showing

[Errno 13] Permission denied: '/home/ubuntu/django/media/pictures'

I have searched in google but no one told giving permissions for media files , they ever all telling about static files only . Can any one please tell me which permission i have to give to it with chmod no.

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

You're having permissions issues. To fix it, you need to allow the Apache process access to the folder and it's content.

This can be done through the following steps

  1. Change the permissions to read and write

    chmod 664 /home/ubuntu/django/media/pictures -R
    
  2. Give the group Apache runs under (www-data group) group ownership of the folder and its content

    sudo chown -R :www-data ~/home/ubuntu/django/media/pictures
    
  3. Restart the Apache service

    sudo service apache2 restart
    

If you want to ensure Django behaves as it should, you can also add the following to your settings.py

FILE_UPLOAD_DIRECTORY_PERMISSIONS = 0o755
FILE_UPLOAD_PERMISSIONS = 0o644
over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda