Menu
SuiteCRM Pull Request Party hosted by SalesAgility
Welcome, Guest
Username: Password: Remember me

TOPIC: How change path for uploads (whit UNC Path?)

How change path for uploads (whit UNC Path?) 1 week 2 days ago #83060

  • polymed
  • polymed's Avatar
  • Offline
  • New Member
  • Posts: 6
  • Thank you received: 2
  • Karma: 0
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
The administrator has disabled public write access.

How change path for uploads (whit UNC Path?) 6 days 18 hours ago #83135

  • pgr
  • pgr's Avatar
  • Offline
  • Administrator
  • Posts: 9833
  • Thank you received: 1468
  • Karma: 349
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?

My SuiteCRM In-depth blog.
Thank you for always stating your SuiteCRM version, checking your logs, reading the Docs, and searching before you ask!
The administrator has disabled public write access.

How change path for uploads (whit UNC Path?) 6 days 16 hours ago #83144

  • polymed
  • polymed's Avatar
  • Offline
  • New Member
  • Posts: 6
  • Thank you received: 2
  • Karma: 0
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:
G:\
G:\\
\\nas\uploads
\\\\nas\\uploads
\\\\nas\\uploads\\\

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 www.DeepL.com/Translator
The administrator has disabled public write access.

How change path for uploads (whit UNC Path?) 5 days 18 hours ago #83184

  • pgr
  • pgr's Avatar
  • Offline
  • Administrator
  • Posts: 9833
  • Thank you received: 1468
  • Karma: 349
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.

My SuiteCRM In-depth blog.
Thank you for always stating your SuiteCRM version, checking your logs, reading the Docs, and searching before you ask!
The administrator has disabled public write access.

How change path for uploads (whit UNC Path?) 5 days 15 hours ago #83191

  • polymed
  • polymed's Avatar
  • Offline
  • New Member
  • Posts: 6
  • Thank you received: 2
  • Karma: 0
Hello pgr

Thanks for your answer.

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

I tried the following:
G:/
G://
//nas/Backup/crm01-upload
//nas/Backup/crm01-upload/
////nas//Backup//crm01-upload
\\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'.

Thanks
Greetings Sam
Attachments:
The administrator has disabled public write access.

How change path for uploads (whit UNC Path?) 5 days 14 hours ago #83194

  • pgr
  • pgr's Avatar
  • Offline
  • Administrator
  • Posts: 9833
  • Thank you received: 1468
  • Karma: 349
Hhmm :huh:

This might also help (directory simlink):
tm.id.au/how-to-symlink-to-a-network-dri...th-xampp-on-windows/

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.

My SuiteCRM In-depth blog.
Thank you for always stating your SuiteCRM version, checking your logs, reading the Docs, and searching before you ask!
The administrator has disabled public write access.

How change path for uploads (whit UNC Path?) 5 days 14 hours ago #83197

  • polymed
  • polymed's Avatar
  • Offline
  • New Member
  • Posts: 6
  • Thank you received: 2
  • Karma: 0
Hi
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.

Sam
The administrator has disabled public write access.
The following user(s) said Thank You: pgr

How change path for uploads (whit UNC Path?) 4 days 19 hours ago #83235

  • polymed
  • polymed's Avatar
  • Offline
  • New Member
  • Posts: 6
  • Thank you received: 2
  • Karma: 0
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
The administrator has disabled public write access.

How change path for uploads (whit UNC Path?) - solved 4 days 14 hours ago #83257

  • polymed
  • polymed's Avatar
  • Offline
  • New Member
  • Posts: 6
  • Thank you received: 2
  • Karma: 0
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 <localdir> <network share dir>.

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 www.DeepL.com/Translator
The administrator has disabled public write access.
The following user(s) said Thank You: pgr
Time to create page: 0.049 seconds
Powered by Kunena Forum