Back

[SOLVED] How to use --permissions option on appwrite cli

  • 0
  • Web
  • Databases
  • Cloud
  • Self Hosted
  • Functions
Majek
30 May, 2023, 12:36

Hi, how can I resolve this error?

TypeScript
zsh: number expected```
TL;DR
To use the --permissions option on appwrite cli, make sure to include the appropriate quotes around the value. For example: appwrite databases createCollection --databaseId "646feb70c324e93d5f31" --collectionId "647033927850c2f34d16" --name area --permissions "read(\"any\")" If you're getting an "unknown file attribute" error, try checking your appwrite version using "appwrite --version" and make sure you're using version 2.0.2. To resolve the "zsh: number expected" error, add quotes around the
Binyamin
30 May, 2023, 12:54

Try like this

TypeScript
appwrite databases createCollection --databaseId 646feb70c324e93d5f31 --collectionId 647033927850c2f34d16 --name area --permissions read(\"any\")   
Majek
30 May, 2023, 12:58

no luck it is returning this unknown file attribute: "

Binyamin
30 May, 2023, 13:00

What's the output of appwrite --version?

Majek
30 May, 2023, 13:01

2.0.2

Binyamin
30 May, 2023, 13:02

Okay, what happened if you try to add quotes to all values and without the permissions ?

TypeScript
appwrite databases createCollection --databaseId "646feb70c324e93d5f31" --collectionId "647033927850c2f34d16" --name area
Majek
30 May, 2023, 13:04

it creates the collection area but I need to create it with permission. I am making a script for deleting a collection and recreating it again.

Binyamin
30 May, 2023, 13:04

Good Just wanted to be sure about something.

Binyamin
30 May, 2023, 13:05

So now try like this

TypeScript
appwrite databases createCollection --databaseId "646feb70c324e93d5f31" --collectionId "647033927850c2f34d16" --name area --permissions "read(\"any\")"   
Majek
30 May, 2023, 13:07

Nice! looks good! thanks man

Drake
30 May, 2023, 13:34

[SOLVED] How to use --permissions option on appwrite cli

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more