First of all thank you very much for your reply.
Unfortunately links that you have provided, didn't resolve my problem
Here is some more explanation what I'm looking for.
Mostly from my site, students are downloading files. They don't need to register for doing that. They sign in as a guest and search for correct course and then download files they need.
Sometimes one course is for several students group. If I want to publish f.e results from the test I must put it and make it avaible for all of them. I want to protect this resource with a password which I would provide on my lessons.
I'm interested only in protecting files. I would be very grateful if you could help me