Thank you for your reply
I have found the answer after I posted this Q&A, the reason why I get the permission denied is that I try to pass the whole folder and that's why it's not working, then I try to use a file with data inside and it works (here is the main reason, I failed when I try to pass an empty file).