---
title: Denied
description: A file URL was refused because it has no signature, a wrong or expired one, or one made for something else.
related:
  - /files-and-code/upload-from-an-app
  - /files-and-code/store-files
  - /errors
---

`Denied` means Luna refused a file URL of one of your luna's buckets. The status is 403.

## Issue

A `GET` or `PUT` to a file URL of a luna fails with one of these messages.

| Message | When |
| --- | --- |
| `uploads need a signed URL (exp, sig)` | A `PUT` came without a signature |
| `this bucket is private: its objects need a signed URL (exp, sig)` | A `GET` came without one, for a bucket that is not public |
| `the URL's signature is wrong or has expired` | The signature does not match, or its time ran out |
| `a download URL doesn't take uploads` | A `PUT` used a URL made with `signDownload` |
| `the URL is for something else` | A `GET` used a URL signed for an upload, or for another bucket or path |

## Cause

Each file URL carries an expiry and a signature, made by your handler with `signUpload` or `signDownload`. Luna checks both against the bucket, the path and the direction the URL was made for.

`Denied` differs from [`Unauthorized`](/errors/unauthorized). `Unauthorized` is about the key or token sent with a call. `Denied` is about the signed URL itself.

## Solution

Retrying the same URL fails again. Ask your luna for a new one.

1. Have a handler sign a fresh URL for the exact path, with `signUpload` for a `PUT` and `signDownload` for a `GET`.
2. Pass a longer `expiresIn` if your app waits before it uses the URL.
3. Send the URL unchanged. Editing its path or query breaks the signature.

To serve a bucket's files without signatures, make the bucket public. [Upload from an app](/files-and-code/upload-from-an-app) covers both.
