# Create an ACL file for a resource - Getting an error

**URL:** <https://forum.solidproject.org/t/create-an-acl-file-for-a-resource-getting-an-error/6528>\
**Category:** General Discussion\
**Created:** [April 18, 2023, 2:20am UTC](https://forum.solidproject.org/t/create-an-acl-file-for-a-resource-getting-an-error/6528 "2023-04-18T02:20:58Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Anushka](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.solidproject.org/anushka/32/3134_2.png) [@Anushka](https://forum.solidproject.org/u/Anushka)\
**Post date:** [April 18, 2023, 2:20am UTC](https://forum.solidproject.org/t/create-an-acl-file-for-a-resource-getting-an-error/6528/1 "2023-04-18T02:20:58Z")

</div>

Hi all,

I am trying to create an .acl file for a resource in CSS via http POST request. But I am getting the following error.

`{"name":"ForbiddenHttpError","message":"Slug bodies that would result in an auxiliary resource are forbidden","statusCode":403,"errorCode":"H403"}`

And my http request is as follows.

```auto
final createResponse = await http.post(
    Uri.parse(fileLocUrl),
    headers: <String, String>{
      'Accept': '*/*',
      'Authorization': 'DPoP $accessToken',
      'Connection': 'keep-alive',
      'Content-Type': 'text/turtle',
      'Link': '<http://www.w3.org/ns/ldp#Resource>; rel="type"',
      'Slug': 'myDataFile.ttl.acl',
      'DPoP': dPopToken,
    },
    body: '',
  );

```

Any idea what’s causing this error?

Thanks in advance for your support.

Anushka

---

<div class="post-metadata">

**Author:** ![Vincent](https://avatars.discourse-cdn.com/v4/letter/v/e9bcb4/32.png) [@Vincent](https://forum.solidproject.org/u/Vincent)\
**Post date:** [April 18, 2023, 7:00am UTC](https://forum.solidproject.org/t/create-an-acl-file-for-a-resource-getting-an-error/6528/2 "2023-04-18T07:00:24Z")

</div>

I believe you’re not allowed to manually set the ACL URL. Instead, you’ll have to read the headers of the Resource you’re trying to create an ACL for, read the `Link` header with `rel="acl"`, and then do a `PUT` with the desired ACL content to that URL to create it.

---

<div class="post-metadata">

**Author:** ![bourgeoa](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.solidproject.org/bourgeoa/32/291_2.png) [@bourgeoa](https://forum.solidproject.org/u/bourgeoa)\
**Post date:** [April 18, 2023, 7:40am UTC](https://forum.solidproject.org/t/create-an-acl-file-for-a-resource-getting-an-error/6528/3 "2023-04-18T07:40:32Z")

</div>

POST is forbidden for auxiliary resources. This is due to the incertain outcome of the location of the resource.  
You MUST use PUT.

---

<div class="post-metadata">

**Author:** ![Anushka](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.solidproject.org/anushka/32/3134_2.png) [@Anushka](https://forum.solidproject.org/u/Anushka)\
**Post date:** [April 18, 2023, 7:46am UTC](https://forum.solidproject.org/t/create-an-acl-file-for-a-resource-getting-an-error/6528/4 "2023-04-18T07:46:08Z")

</div>

Great. Thanks a lot @Vincent and @bourgeoa. That worked perfectly.
