Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
stevedark
Partner Ambassador/MVP
Partner Ambassador/MVP

Saving file from IMAP get attachments fails - Nov 2017

Hi,

Just been through the upgrade to QWC November 2017, and had various configuration changes to make.

In case it is useful to anyone;

Had to change MailboxConnector in ConnectorID to MailboxIMAPConnector

Had to remove Imap from each tablename parameter (e.g. MessagesInFolder)

Had to change the field sent to sentLocalTime on MessagesInFolder

and on Notification connector

Had to specify Port and SSL again on connector settings, as the prior settings were lost

Some of these things were covered in the documentation, others I had to work out.

I also added the various folders to FileSystemAccessAllowedPaths


This worked for the attachment cache on the SMTP connector, but I could not get it to work properly for MessageDownloadAttachment on saving the file.

I assumed, given the example of specifying C:\ in the comments that everything under the specified folder was included.

So, I specified this, to allow all paths under my SourceData folder:

<FileSystemAccessAllowedPaths>C:\QlikSense\SourceData\</FileSystemAccessAllowedPaths>

This failed.

So, I specified an explicit path (of which I will need to keep adding new ones) to test that:

<FileSystemAccessAllowedPaths>C:\QlikSense\SourceData\Scotland\</FileSystemAccessAllowedPaths>


Still no joy.

Seeing that * is allowable, I tried the following:

<FileSystemAccessAllowedPaths>C:\QlikSense\SourceData\*</FileSystemAccessAllowedPaths>


This time it actually stopped the QWC service starting, with no useful error coming back form Services.


In the end I opted for

<FileSystemAccessAllowedPaths>*</FileSystemAccessAllowedPaths>


This seems to be working fine now.


As it is now working the same as it was before, as there was no granularity around file system permissions, I'm not unhappy with this as a solution.  Just documenting it here for others, to find out what the intended config syntax is and advise if this is a bug that needs to be fixed.

Cheers,

Steve


balbam


1 Solution

Accepted Solutions
Anonymous
Not applicable

Just a couple of notes regarding people having issues with the FileSystemAccessAllowedPaths setting.

[1] We have been reviewing some other reports of this recently and they turned out to be because the user account running the QWC exe/service did not have permissions to access the file in question (I think we can improve our error messaging here to make it clearer what is going wrong). This is important, for QWC to access a file it is a pre-requisite that this user account has permissions on that path/file. The FileSystemAccessAllowedPaths gives an extra layer of defence/control.

[2] You cannot set the FileSystemAccessAllowedPaths element to something like:

<FileSystemAccessAllowedPaths>C:\QlikSense\SourceData\*</FileSystemAccessAllowedPaths>

It should be:

<FileSystemAccessAllowedPaths>C:\QlikSense\SourceData\</FileSystemAccessAllowedPaths>


The * can only be used on its own, i.e.:

<FileSystemAccessAllowedPaths>*</FileSystemAccessAllowedPaths>


And this tells QWC to whitelist all file paths.

View solution in original post

4 Replies
Anonymous
Not applicable

Hi Steve,

Thanks for reporting these findings. Regarding the FileSystemAccessAllowedPaths issues, I can't repo this unfortunately and we tested this quite carefully before launch so I am wondering how we can look into this. Is it OK to contact you directly to try and dig a little?


Regarding the lack of useful error message with 'C:\QlikSense\SourceData\*', could you confirm you checked the QWC Service startup log in the root folder? There should have been a message there..

stevedark
Partner Ambassador/MVP
Partner Ambassador/MVP
Author

Hi Chris,

Thanks for your prompt response.  Happy for you to contact directly to arrange a screen-share.

The error message is present and correct there as you suggest:

25/01/2018 11:21:20 OnStart:ERROR: System.Exception: There was an error processing the FileSystemAccessAllowedPaths element of deploy.config (Error adding path 'C:\QlikSense\SourceData\*' to whitelist (Illegal characters in path.))

I didn't look too hard for this previously, as I knew the last change I had made to the config, so was able to put it back to a working state straight away.

Steve

Anonymous
Not applicable

Just a couple of notes regarding people having issues with the FileSystemAccessAllowedPaths setting.

[1] We have been reviewing some other reports of this recently and they turned out to be because the user account running the QWC exe/service did not have permissions to access the file in question (I think we can improve our error messaging here to make it clearer what is going wrong). This is important, for QWC to access a file it is a pre-requisite that this user account has permissions on that path/file. The FileSystemAccessAllowedPaths gives an extra layer of defence/control.

[2] You cannot set the FileSystemAccessAllowedPaths element to something like:

<FileSystemAccessAllowedPaths>C:\QlikSense\SourceData\*</FileSystemAccessAllowedPaths>

It should be:

<FileSystemAccessAllowedPaths>C:\QlikSense\SourceData\</FileSystemAccessAllowedPaths>


The * can only be used on its own, i.e.:

<FileSystemAccessAllowedPaths>*</FileSystemAccessAllowedPaths>


And this tells QWC to whitelist all file paths.

stevedark
Partner Ambassador/MVP
Partner Ambassador/MVP
Author

Hi Chris - thanks for the update.  It's not clear that you shouldn't put the * at the end of the path, and it's a reasonable thing to assume will work (seeing there is the example of having just * in the config file).

Now I know that putting a path without a * will do all folders underneath though all is good.