244
Views
6
Comments
Solved
[FileSystem] Win32 Error : 5 Acccess to the path is denied
Question
filesystem
Service icon
Forge asset by João Portela

Hello,

I am making a test module to see the working of Filesystem Forge component. I have attached my OML here. Can anybody explain why I am getting this error. Is there something I am doing wrong?

Any help or advise will be greatly appreciated!

Thank you.

FileSystemTest.oml
2020-09-15 13-07-23
Kilian Hekhuis
 
MVP
Solution

Hi Sameeksha,

The error is clear: you are trying to access a path (folder, directory) that you (or rather, the software) doesn't have access to. This is a matter of priviliges on Windows level. It seems you are trying to access "C:\OutSystems\Sandboxes\Platform Server\running\FileSystemTest\ff", what's that "ff", is that what you are trying to create, or an existing directory? Anyways, by default, the Windows user running the software is the IIS user, and it has write access to the base directory and to the image directory (img), iirc.

2022-08-03 04-32-50
Ravi Punjwani

Hi Sameeksha,

Can you elaborate more on what error message are you receiving?

Also check on the Service Center app to find out more information about the error description and stack trace.

I was able to install and access your app home screen. Here's the screenshot

UserImage.jpg
Sameeksha Dwivedi

Hi Ravi,

There is no error log on service center. The Action Create_directory is returning error :


Win32Error: 5

System.UnauthorizedAccessException: Access to the path 'C:\OutSystems\Sandboxes\Platform Server\running\FileSystemTest\ff' is denied.

   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)

   at System.IO.Directory.InternalCreateDirectory(String fullPath, String path, Object dirSecurityObj, Boolean checkHost)

   at System.IO.Directory.InternalCreateDirectoryHelper(String path, Boolean checkHost)

   at OutSystems.NssFileSystem.CssFileSystem.MssDirectory_Create(String ssPath, String ssDomain, String ssUsername, String ssPassword, String& ssError_message)


The same error is returned by Write_FileBinary Action as well.

2022-08-03 04-32-50
Ravi Punjwani

Hi Sameeksha,

Did you make sure you have the right permissions on your environment?

If you're using this on a trial / personal environment, I doubt you will be able to create anything using this component since the environment settings won't allow doing that.

UserImage.jpg
Sameeksha Dwivedi

Hi Ravi,

I am also using this module on my personal environment. Are these actions not supported for personal environment?

2022-08-03 04-32-50
Ravi Punjwani

It won't work, Sameeksha.

What are you using this component for? Usually in most cases, it is rarely seen to be requiring this component.

Can you explain a bit more about your use case? I might suggest you some other alternative.

2020-09-15 13-07-23
Kilian Hekhuis
 
MVP
Solution

Hi Sameeksha,

The error is clear: you are trying to access a path (folder, directory) that you (or rather, the software) doesn't have access to. This is a matter of priviliges on Windows level. It seems you are trying to access "C:\OutSystems\Sandboxes\Platform Server\running\FileSystemTest\ff", what's that "ff", is that what you are trying to create, or an existing directory? Anyways, by default, the Windows user running the software is the IIS user, and it has write access to the base directory and to the image directory (img), iirc.

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