[FileSystem] Filesystem Win32:5 error
Forge component by João Portela
Application Type
Traditional Web

Good afternoon, we have worked with our security team to grant out OutSysDev.svc account read/write access to a network drive.   We are running an on-prem Outsystems instance and our admin logged in with the service account and verified that he has access to the directory in question.  

However, when I run my application and try to read files from this directory I get the error below.   My understanding is that the account that IIS runs under would be the account needing read/write access, but this doesn't appear to be the case.   Any suggestions on what I would look at next?

Win32Error: 5
System.UnauthorizedAccessException: Access to the path '\\{Server}\Apps\CERTTool_Test\TEST' is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileSystemEnumerableIterator`1.CommonInit()
at System.IO.FileSystemEnumerableIterator`1..ctor(String path, String originalUserPath, String searchPattern, SearchOption searchOption, SearchResultHandler`1 resultHandler, Boolean checkHost)
at System.IO.DirectoryInfo.InternalGetFiles(String searchPattern, SearchOption searchOption)
at OutSystems.NssFileSystem.CssFileSystem.MssDirectory_ListFiles(String ssDirectoryPath, RLLineRecordList& ssFileList, String ssDomain, String ssUsername, String ssPassword, String& ssError_message)

Hi Josh,

Can you please verify below four reason

1. The caller does not have the required permission.

2. The file is an executable file that is in use.

3. Path is a directory.

4. Path specified a read-only file.


CV sharma

Hi Josh,

Have you tried granting the "Network Service" permission to the folder?

Thanks & Kind Regards,



Hi Josh,

You need to provide access permission on this directory when you FileSystem for Read/write.

1. Go to Windows Server where Outsystem Installed

2. Open C drive - Program Files   (C:\Program Files\OutSystems)

3. see running folder and see you Application folder-

then right click -Properties - open a new tool see Security Tab and provide permission like below image  for everyone with Full control.


Also in file System you can provide USername and Password for access directory.

Hope this will help you.



Thank you all for the responses.   I was trying to access the file system from a client action in a reactive web app, when I got to the read files step I always received the error.

I decided to change the logic from a client action that calls a server action into a fetch directly from the server action,  and that worked fine.   It seems the issue was related to starting the filesystem read from the client action.

At any rate, I am now getting back the anticipated list of files.   Thanks again!

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.