
Hi im trying to create a document.. i want to give some users access to read the document... im using
[ Permission.read(Role.user("62f5509c95b3ca818386")), Permission.read(Role.user("62eda8240ae7ce3ec563")),
]
but im getting this error
[AppwriteException: Permissions must be one of: (any, users, user:62f00557d69fcfbe9c1e, user:62f00557d69fcfbe9c1e/verified, users/verified, team:paidUsers, member:62f5509c95b3ca818386, team:paidUsers/paidUsers)]

When using a Client side SDK the user can give permission only to any, users, or any thing in the list including the user itself.
But, if you want to give permission to other users you'll have to use the Server sdk
P.s. It's actually doesn't mentionedit at the permission documentation in the website But, you can read it here https://github.com/appwrite/appwrite/blob/master/app/controllers/api/databases.php#L2690

And it does sounds right and make sense that the user will have option to let give other user permissions if that user is the owner of the document.
As of now Appwrite doesn't have the document-owner logic so you'll have to go with a function.

what is the difference bw client sdk and server sdk?

First you can check here https://appwrite.io/docs/sdks

In general
- Client - User/guest based. limited.
- Server - With API key can do almost everything.

does the permission rules applies to storage also?


but what is reason for not allowing ?

I think it's security wise. But, I see your logic I'll recommend search, or create a feature request for it.
Recommended threads
- Sharing cookies
Hi, I’m using Appwrite Cloud, and I have a setup where my Appwrite backend is hosted on a subdomain (e.g., api.example.com), while my frontend (Next.js app) and...
- Organization not exists anymore
Hello! We have a problem with a cloud database. We are on the Free plan, but after a refresh the site wants me to create a new organisation, and I not see the c...
- JSON and Object Support in Collection do...
I am working with Next.Js and Appwrite Cloud, I am relatively New to Appwrite but i have noticed there is no direct support of JSON and Object support in attrib...
