How change path for uploads (whit UNC Path?)

Hello everybody

We want to move the uploads directory from SuiteCRM to a NAS. We tried to enter a UNC path directly in the config but it doesn’t work. Then we made a shortcut to the NAS, but this also results in an error.

Question: how can I add an external path to the config to use the directory of the NAS and not the local uploads?

Kind regards Sam Gasser

I am not sure, this would likely need some changes to the code. I agree it would be a nice feature to have.

What is your version of SuiteCRM? And is this Windows or Linux? Which paths did you try in config?

Hello pgr
Thank you so much for the answers.

We currently have version 7.11.2.
We are using Windows Server 2012 R2.
Path is currently the default path uploads/.

I would like to have the uploads not on the local server but on an external drive or on a network attached storage (NAS).

I have tried the following:

  • Link to NAS directory
  • Nas directory mapped locally with drive letters e.g. G:\

and I tried the following paths:

Unfortunately, everything doesn’t work.

If users are busy uploading data, the server’s hard drive will soon be full.

Has nobody really done that yet?

Friendly greetings
Sam Gasser

Translated with

You should be able to do it, as long as the path is read correctly. I am guessing the backslashes can be confusing the code which is more tested in Linux where “/” rules.

Can you try some forward-slashes?

Also, tell me which config value you are changing, ideally we would look in the code at the way the path is handled, so we can get to the bottom of this.

Hello pgr

Thanks for your answer.

Unfortunately it didn’t work out.
We are using Xampp on Windows.

I tried the following:
\nas\Backup\crm01-upload => generated a new direcotry on C:\nas\Backup\crm01-upload

I change the path in config.php at ‘upload_dir’ => ‘uploads’.

Greetings Sam

Hhmm :huh:

This might also help (directory simlink):

Another suggestion: try to make sure that your Apache can access that share through PHP. Make a simple PHP script and try to get it to open a file, for example.

This test will be useful to sort out any access issues, and get the exact nomenclature needed to reference the Path. If you can’t get that to work, then at least we know it’s a SuiteCRM issue, it’s a PHP/Apache/NAS issue.

Thank you very much for the tips.

I did the tip with mklink and added the login data of the domain to the Apache service.
I can’t just restart the service because about 50 people are working on it.
I created a php script that simply opens a text file and displays the content. This works fine locally, but not on the directory that was made with mlink.
But I have to say that it was tried before the Apache service neustat.

So the test is only valid after the Apache Service restart.
I will write here as soon as I could restart the service.


1 Like

Hi pgr

Thank you very much for the link.
We restarted Apache and tested the changes. Unfortunately it still doesn’t work.

But I have now created a test.php where I open a file on the network drive.
Since this is not possible yet, I strongly assume that this is no longer a problem of SuiteCRM, but I suspect it is a problem of Xampp itself.
I think it is until I have a solution completed for the time being.
I will write here again as soon as there is something new to the case.

Greetings Sam

Hello together

Now it’s worked. As mentioned in the link above, I provided the Apache service with login data from our Domain Admin and made a link called crm_upload with mklink /D .

Then in the config.php the path has to be entered exactly like this at upload_dir: c:\xampp\htdocs\SuiteCRMtest\crm-upload\
(yes, whit double slashes)

Then just copy the whole content from the directory htdocs\suitecrm\uploads to the networkshare and restart the Apache service. Then everything is automatically saved on the NAS.
Problem solved.

Greetings Sam

Translated with

1 Like