I am using the methods below in my AIF service class to download a file on the server.
new FileIOPermission(downloadsDir, "rw").assert();
webClient = new System.Net.WebClient();
webClient.DownloadFile(filePath, downloadedFile);
I have successfully able to download the file in a folder which is accessible to "everyone" and the owner name of downloaded file is showing as AOS service account user.
So my question is that if I need to download the file in a folder with limited rights, I would only need to give permission to AOS user or all the users calling the service would also need permission for the folder.