Will Gambas ever integrate SMB so I can store my data on my server?

Post your Gambas programming questions here.
Post Reply
AndrewZabar
Posts: 9
Joined: Monday 19th June 2023 1:51pm

Will Gambas ever integrate SMB so I can store my data on my server?

Post by AndrewZabar »

Greetings all,

I am fairly new to Gambas, a bit less new to Linux but still not an expert. So, I prefer to keep work data on my server so that it is on a fault-tolerant system, and also so that I can open it up and work on it from any computer and always be working with the most recent version. The problem is Gambas shows only the local file system.

Now, it is my understanding that it is possible to mount an SMB folder into a local folder so that going to the local folder is really going to the SMB directory. Despite trying and troubleshooting, I have never been able to get this to work, and nobody has been able to help me get it to work. Nevertheless, even with this facility possible, many other applications are able to look to my servers. Some can only do so once I have mounted them in my system's file manager (ie: dolphin, thunar, etc.) utilizing the fact that those share it back to the rest of the OS.

My vernacular may be very inaccurate, but I think you likely get my point. So, would this be made possible anytime in the future? If not, is anyone feeling adventurous enough to help get my systems mapping my server directories in a way that they appear to be "local"?

Thanks for reading.
User avatar
gbWilly
Posts: 68
Joined: Friday 23rd September 2016 11:41am
Location: Netherlands
Contact:

Re: Will Gambas ever integrate SMB so I can store my data on my server?

Post by gbWilly »

Now, it is my understanding that it is possible to mount an SMB folder into a local folder so that going to the local folder is really going to the SMB directory. Despite trying and troubleshooting, I have never been able to get this to work, and nobody has been able to help me get it to work
I understand you want to work on a windows network share from your linux system and want to store your gambas projects there and work on them from you linux system?

If so you will need to mount the network share to a local folder on you linux system.
You will also need samba for the authentication with the windows share.
Meaning that your mount will need to provide the windows credentials to read and write to the share.

If done right this all can be done in a boot so that the mount happens automatically every time the linux system starts and provided the share is available on the network.

Example:
You have a share on a windows system with ip 192.168.1.1 and share name is "mydevelopment".
Username on share for permissions is "develop" with password "mypasstowriteonwindows"
Make sure this user can read and write on the share!!

1. Install samba client on your system. This provides acces to SMB shares.
On Debian/Ubuntu/LinuxMint (needs root or sudo privileges to install)

Code: Select all

apt-get install smbclient cifs-utils
2. In /ect/samba make a file named userwin with this content (needs root or sudo privileges to make) :

Code: Select all

username=develop
password=mypasstowriteonwindows
3. Make /etc/samba/userwin read only (needs root or sudo privileges)

Code: Select all

chmod 0400 /etc/samba/userwin
4. Make a folder in your home folder (let's say your home folder on linux is /home/andrew )to mount your networkshare locally

Code: Select all

mkdir mystuffonwindows
5. In fstab (located in /etc) add this (needs root or sudo privileges):

Code: Select all

//192.168.1.1/mydevelopment  /home/andrew/mystuffonwindows  cifs  credentials=/etc/samba/userwin,noexec  0  0
6. Restart your system and if all worked /home/andrew/mystuffonwindows should be filled with the neworkshare files and data.

7. Test if you can edit files and save them on the share. You should also be able to browse to this share from Gambas IDE.

Good luck with fiddling around.
gbWilly
- Dutch translation for Gambas3
- Gambas wiki content contributer


... there is always a Catch if things go wrong!
AndrewZabar
Posts: 9
Joined: Monday 19th June 2023 1:51pm

Re: Will Gambas ever integrate SMB so I can store my data on my server?

Post by AndrewZabar »

Well, it's a Synology NAS, not a Windows share, but thank you! I will follow your instructions step by step. I appreciate your response. Will follow up and let you know if successful.
User avatar
gbWilly
Posts: 68
Joined: Friday 23rd September 2016 11:41am
Location: Netherlands
Contact:

Re: Will Gambas ever integrate SMB so I can store my data on my server?

Post by gbWilly »

Well I've only had to deal with SMB shares on Windows servers, but it should all work the same.
As long as credentials on the Synology NAS to approach the share are properly provided and the location to the share is properly mounted to a local folder you should be good.
gbWilly
- Dutch translation for Gambas3
- Gambas wiki content contributer


... there is always a Catch if things go wrong!
Post Reply