[FileSystem] Access to the path is denied

Forge Component
(30)
Published on 21 Feb by João Portela
30 votes
Published on 21 Feb 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?

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 

Hi Raquel,

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


regards,

João Portela


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.


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.

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.

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.

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?


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


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

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