Closed Bug 795934 Opened 13 years ago Closed 13 years ago

developer.mozilla.org Upload Issues

Categories

(Infrastructure & Operations Graveyard :: WebOps: Other, task)

x86
macOS
task
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: davidwalsh, Assigned: cturra)

Details

The MDN site allows users to upload attachments as supporting info for documents. We're currently receiving the following error when trying to upload: Traceback (most recent call last): File "/data/www/developer.allizom.org/kuma/vendor/src/django/django/core/handlers/base.py", line 100, in get_response response = callback(request, *callback_args, **callback_kwargs) File "/data/www/developer.allizom.org/kuma/vendor/src/django/django/views/decorators/http.py", line 37, in inner return func(request, *args, **kwargs) File "/data/www/developer.allizom.org/kuma/apps/access/decorators.py", line 46, in _wrapped_view return view_fn(request, *args, **kwargs) File "/data/www/developer.allizom.org/kuma/apps/wiki/views.py", line 1760, in new_attachment rev.save() File "/data/www/developer.allizom.org/kuma/apps/wiki/models.py", line 1615, in save super(AttachmentRevision, self).save(*args, **kwargs) File "/data/www/developer.allizom.org/kuma/vendor/src/django/django/db/models/base.py", line 458, in save self.save_base(using=using, force_insert=force_insert, force_update=force_update) File "/data/www/developer.allizom.org/kuma/vendor/src/django/django/db/models/base.py", line 541, in save_base for f in meta.local_fields if not isinstance(f, AutoField)] File "/data/www/developer.allizom.org/kuma/vendor/src/django/django/db/models/fields/files.py", line 255, in pre_save file.save(file.name, file, save=False) File "/data/www/developer.allizom.org/kuma/vendor/src/django/django/db/models/fields/files.py", line 92, in save self.name = self.storage.save(name, content) File "/data/www/developer.allizom.org/kuma/vendor/src/django/django/core/files/storage.py", line 48, in save name = self._save(name, content) File "/data/www/developer.allizom.org/kuma/vendor/src/django/django/core/files/storage.py", line 144, in _save os.makedirs(directory) File "/usr/lib64/python2.6/os.py", line 150, in makedirs makedirs(head, mode) File "/usr/lib64/python2.6/os.py", line 150, in makedirs makedirs(head, mode) File "/usr/lib64/python2.6/os.py", line 150, in makedirs makedirs(head, mode) File "/usr/lib64/python2.6/os.py", line 150, in makedirs makedirs(head, mode) File "/usr/lib64/python2.6/os.py", line 150, in makedirs makedirs(head, mode) File "/usr/lib64/python2.6/os.py", line 157, in makedirs mkdir(name, mode) OSError: [Errno 13] Permission denied: '/data/www/developer.allizom.org/kuma/media/attachments' <WSGIRequest GET:<QueryDict: {}>, POST:<QueryDict: {u'comment': [u'test'], u'description': [u'test'], u'title': [u'test'], u'submit': [u'Upload'], u'is_ajax': [u'1'], u'csrfmiddlewaretoken': [u'c6446af0740f8f32547e5b4a57032c15']}>, COOKIES:{'browserid_explained': '1', 'csrftoken': 'c6446af0740f8f32547e5b4a57032c15', 'sessionid': 'd95def91f162a709126254f6c9e3dabf'}, META:{'CONTENT_LENGTH': '3175', 'CONTENT_TYPE': 'multipart/form-data; boundary=---------------------------830696134718734991183479362', 'CSRF_COOKIE': 'c6446af0740f8f32547e5b4a57032c15', 'DOCUMENT_ROOT': '/data/www/developer.allizom.org/kuma/webroot', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTPS': 'on', 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 'HTTP_ACCEPT_ENCODING': 'gzip, deflate', 'HTTP_ACCEPT_LANGUAGE': 'fr,fr-fr;q=0.8,en-us;q=0.5,en;q=0.3', 'HTTP_CONNECTION': 'keep-alive', 'HTTP_COOKIE': 'csrftoken=c6446af0740f8f32547e5b4a57032c15; sessionid=d95def91f162a709126254f6c9e3dabf; browserid_explained=1', 'HTTP_DNT': '1', 'HTTP_HOST': 'developer.allizom.org', 'HTTP_REFERER': 'https://developer.allizom.org/en-US/docs/HTML$edit', 'HTTP_SSLCLIENTCERTSTATUS': 'NoClientCert', 'HTTP_SSLCLIENTCIPHER': 'SSL_RSA_WITH_RC4_128_SHA, version=TLSv1, bits=128', 'HTTP_SSLSESSIONID': 'CC0C151D261BECE55D1C4C8C7014A6CA734F2F4726610EC680F6C428BF682660', 'HTTP_USER_AGENT': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:15.0) Gecko/20100101 Firefox/15.0.1', 'HTTP_X_CLUSTER_CLIENT_IP': '81.57.72.215', 'PATH_INFO': u'/files/new/', 'PATH_TRANSLATED': '/data/www/developer.allizom.org/kuma/wsgi/kuma.wsgi/files/new/', 'QUERY_STRING': '', 'REMOTE_ADDR': '10.22.81.213', 'REMOTE_PORT': '39984', 'REQUEST_METHOD': 'POST', 'REQUEST_URI': '/files/new/', 'SCRIPT_FILENAME': '/data/www/developer.allizom.org/kuma/wsgi/kuma.wsgi', 'SCRIPT_NAME': u'', 'SCRIPT_URI': 'http://developer.allizom.org/files/new/', 'SCRIPT_URL': '/files/new/', 'SERVER_ADDR': '10.22.81.17', 'SERVER_ADMIN': 'webmaster@mozilla.com', 'SERVER_NAME': 'developer.allizom.org', 'SERVER_PORT': '80', 'SERVER_PROTOCOL': 'HTTP/1.1', 'SERVER_SIGNATURE': '', 'SERVER_SOFTWARE': 'Apache', 'mod_wsgi.application_group': 'developer.allizom.org|', 'mod_wsgi.callable_object': 'application', 'mod_wsgi.handler_script': '', 'mod_wsgi.input_chunked': '0', 'mod_wsgi.listener_host': '', 'mod_wsgi.listener_port': '81', 'mod_wsgi.process_group': 'developer_stage', 'mod_wsgi.request_handler': 'wsgi-script', 'mod_wsgi.script_reloading': '1', 'mod_wsgi.version': (3, 3), 'platform.name': 'developer1.stage.webapp.scl3.mozilla.com', 'wsgi.errors': <mod_wsgi.Log object at 0x7f94671ed870>, 'wsgi.file_wrapper': <built-in method file_wrapper of mod_wsgi.Adapter object at 0x7f94671cfdc8>, 'wsgi.input': <mod_wsgi.Input object at 0x7f94671ed970>, 'wsgi.loaded': datetime.datetime(2012, 10, 1, 7, 44, 46, 880742), 'wsgi.multiprocess': True, 'wsgi.multithread': False, 'wsgi.run_once': False, 'wsgi.url_scheme': 'https', 'wsgi.version': (1, 1)}> My guess is that the following directory needs write permissions: /media/attachments/2012/10
:davidwalsh - i noticed the root (attachments) directory was owned by apache:root which might have been causing this issue. i have now updated the group to apache. the other directories inside attachments look to have the correct groups and (w)rite permissions for the apache user. can you please test again for me?
Assignee: server-ops-webops → cturra
No errors during my test, we must be all set! Thank you!
:davidwalsh good news! i will go ahead and mark this bug as resolved.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Component: Server Operations: Web Operations → WebOps: Other
Product: mozilla.org → Infrastructure & Operations
Product: Infrastructure & Operations → Infrastructure & Operations Graveyard
You need to log in before you can comment on or make changes to this bug.