1509
Views
17
Comments
[FileSystem] Access to the path is denied
Question
filesystem
Service icon
Forge asset by João Portela


I'm trying to upload a file and save it to a folder, however, the system is showing the access denied message. The folder already has all the read and write permissions.Does anyone have a solution to this problem?

2020-02-28 09-46-54
Eduardo Jauch

Hello Raquel, 

You told the permissions are defined, but for which user? 

I think you need to set the application to run impersonating the correct user that has privileges to access that folder. 

Please take a look in the espace configuration in Service Center, under tab Operations, where you can find a Run As option. 

Cheers 

2024-04-05 15-02-07
João Portela
Staff

Hi Raquel,

You might need to grant read/write permissions to the user running IIS/applications.


regards,

João Portela


UserImage.jpg
Fernando Neto

João Portela wrote:

Hi Raquel,

You might need to grant read/write permissions to the user running IIS/applications.


regards,

João Portela


Hi João,

Im facing the same problem as Rachel, and i will try to follow your suggestion tomorrow when i get to work.

However im a bit curious about something.  By having to give permission to the user running IIS/applications in order to have read rights on the folders does it means that the folder where the files/images will be stored have to be on the same server where the outsystems platform is running instead of being in a shared folder somehwre on the network? And doesnt this approach becomes cumbersome one things need to be promoted to QA and the later to production?


Regards.


2023-03-18 19-02-28
Raquel Gomes

João Portela wrote:

Hi Raquel,

You might need to grant read/write permissions to the user running IIS/applications.


regards,

João Portela



I have all the read and write permissions . Apparently, it's the action, I'm not passing the correct folder info


UserImage.jpg
Larry Mills

I use the FileSystem component.  There are domain, username, password required.  For us, this is a domain admin account.  The folders I access are shared, but I did this for other reasons; not necessarily because the component required.

The domain and username elements are in double quotes.

The folders I access are defined as site properties on the theme.

I also have password for the domain username defined as a site property.

Created function to return the password for the component.  Is this any help?  Simple once working.  I can send more.

UserImage.jpg
Fernando Neto

Larry Mills wrote:

I use the FileSystem component.  There are domain, username, password required.  For us, this is a domain admin account.  The folders I access are shared, but I did this for other reasons; not necessarily because the component required.

The domain and username elements are in double quotes.

The folders I access are defined as site properties on the theme.

I also have password for the domain username defined as a site property.

Created function to return the password for the component.  Is this any help?  Simple once working.  I can send more.

Hi Larry,

I try to follow changed my implementation, and already have configured my domain username and the folder as the as site properties, and i used them to build the full path to be used by the aplication; but it believe im not constructing my string in the right order or something.

As its the 1st part of the string is the share folder path, the 2nd one is the  name of the file, and 3rd one the user credentials.
1 - "\\xxx.yyy.zzz.aaa\foldername\"
2 - "Banner.jpg"
3 - "/USER:myDomain\myUser myPassword /PERSISTENT:True"

Resulting on the following output:
 Path: "\\xxx.yyy.zzz.aaa\foldername\Banner.jpg /USER:myDomain\myUser myPassword /PERSISTENT:True"

But it seems like this is not a valid format for the component, because the system return the following error message: - "The given path's format is not supported."

Can you please break down the structure of the string that is working for you, and you mentioned you have the domain and the username elements in double quotes, can you please explain what do you exaxctly mean by that?

Thanks in advance

UserImage.jpg
Larry Mills

Defined folder site properties in IP for instead of the server name:

\\xxxx,yyyy.zzzz.aaaa\myfolder\

I know hardcoding,but I had to get it working.

2023-03-18 19-02-28
Raquel Gomes

Larry Mills wrote:

Defined folder site properties in IP for instead of the server name:

\\xxxx,yyyy.zzzz.aaaa\myfolder\

I know hardcoding,but I had to get it working.

Has this solution worked for you? Were you able to save in the folder?


UserImage.jpg
Larry Mills

Fernando,

Regarding to your IIS question above - the folders we access are NOT on the Outystems IIS platform server; they are on a different server.  

If you have an admin account which runs your Outsystems platform, I you can use this account.  

I have folders used in QA, Test, and production enviroments. When I move not really an issue because they are defined as site properties.

2023-03-18 19-02-28
Raquel Gomes

I can already access the folder .. just do an action that saves the file upload to the folder .Anybody know?

UserImage.jpg
Waye

Hi All,


We are having the same issue (access to the path \\192.168.2.2\uploads is denied) on our environment wherein we have 2 app servers connected to a load balancer in the same vlan that connects to the file server to access a shared folder on another vlan. A service account was created and given read/write access to the shared folder.


The upload works when we put the file share inside one of the app servers, but it fails when we try to upload to the file server's shared folder.


I have two questions in mind:

  1. Would anyone know if the component sends its response (1) directly to the app server or (2) to the load balancer? (Please refer to attached file for a visualization)
  2. Does the component use the service account set in the site properties or the logged in user of the app?
  3. Would anyone have any other ideas as to what can be the cause?


Thanks!

FSIssue1.PNG
2024-12-17 14-32-59
Matthias Preuter
 
MVP

Hi Waye,

  1. When starting an action from a FileSystem action from a webpage or timer, it is started on one of the App Servers, this is decided by the Load Balancer.
  2. When the domain / username / password parameters are set on the FileSystems action it uses these settings (picture 1); otherwise it uses the Run as user of the module (picture 2). It is not using the logged in user of the app.
  3. Did you set the domain / username / password that with the values of the account that is granted permission on this fileshare?


Hope this will help you,

Matthias



UserImage.jpg
Waye

Matthias Preuter wrote:

Hi Waye,

  1. When starting an action from a FileSystem action from a webpage or timer, it is started on one of the App Servers, this is decided by the Load Balancer.
  2. When the domain / username / password parameters are set on the FileSystems action it uses these settings (picture 1); otherwise it uses the Run as user of the module (picture 2). It is not using the logged in user of the app.
  3. Did you set the domain / username / password that with the values of the account that is granted permission on this fileshare?


Hope this will help you,

Matthias



Hi Matthias,


  1. What about the response? So the action request goes from App Server > LB > File Share > LB > App Server, is this sequence correct?
  2. Does picture 1 get the domain / username/ password infos from the Site Properties?
  3. Yes, our current setup is that the username and password are set in the Site Properties then the app just references them.


Thanks for your detailed response and suggestion,

Waye


2024-12-17 14-32-59
Matthias Preuter
 
MVP
  1. No the sequence is not correct. It is LB > App Server > File Share > App Server.(The server action is a .Net method and not a WebRequest)
  2. No you have to set them manually during development, cause the action doesn't know how you named the site properties
UserImage.jpg
Waye

Matthias Preuter wrote:

  1. No the sequence is not correct. It is LB > App Server > File Share > App Server.(The server action is a .Net method and not a WebRequest)
  2. No you have to set them manually during development, cause the action doesn't know how you named the site properties

Thanks, will get back to this thread when we have solved our problem or have further inquiries.


2024-08-11 11-28-21
Ivan Barroso

Hi Guys,
I have a similar problem.
I'm trying to copy a file using File Copy but i'm receiving the following error

This error started after a Windows Server upgrade and also OutSystems Platform from 8 to 11, so it appears to be some configuration that perhaps is not well definided now.

Here is the flow:


Best Regards

UserImage.jpg
Joao Kakiades

Hi all,

I have the same question, how i can access to a network folder? I'm working on personal environment, so i cannot map a drive in server.


Thanks

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