how I know owner of file and its permission through c program

Helo
I havea particular file.

how I know ownerof the file as well as file permission using c program.

Regards,
Amit

Use the stat system call.

helo thx for yr help.

I want to write a program in c:

I have one binary which create different users and u can log in with that user.

Now,I m creating a particular file usinag a particular user login

suppose I create test.scrn file under test user..

Now I m logining under another user lets say test1

Now I want that file create under test user want be deleted for this user test1

so how I write general logic for that

Regards,
Amit

Can you please re-word this question?

:confused: Hemm! Quite confusing!

Do you mean you want the file created by user test to be unavailable(deleted) to user test1?