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

Post

Posted
Rating:
#1 (In Topic #1063)
Regular
AndrewZabar is in the usergroup ‘Regular’
 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.
Online now: No Back to the top

Post

Posted
Rating:
#2
Avatar
Administrator
gbWilly is in the usergroup ‘unknown’
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 <COLOR color="#FF0000"><COLOR color="#4000BF">192.168.1.1</COLOR></COLOR> and share name is "<COLOR color="#4000BF">mydevelopment</COLOR>".
Username on share for permissions is "<COLOR color="#FF0000">develop</COLOR>" with password "<COLOR color="#FF0000">mypasstowriteonwindows</COLOR>"
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

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

username=develop
password=mypasstowriteonwindows

3. Make /etc/samba/userwin read only (needs root or sudo privileges)

Code

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

mkdir mystuffonwindows

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

Code

//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
- Gambas Dutch translator
- Gambas wiki content contributor
- Gambas debian/ubuntu package recipe contributor
- GambOS, a distro for learning Gambas and more…
- Gambas3 Debian/Ubuntu repositories


… there is always a Catch if things go wrong!
Online now: No Back to the top

Post

Posted
Rating:
#3
Regular
AndrewZabar is in the usergroup ‘Regular’
 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.
Online now: No Back to the top

Post

Posted
Rating:
#4
Avatar
Administrator
gbWilly is in the usergroup ‘unknown’
 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
- Gambas Dutch translator
- Gambas wiki content contributor
- Gambas debian/ubuntu package recipe contributor
- GambOS, a distro for learning Gambas and more…
- Gambas3 Debian/Ubuntu repositories


… there is always a Catch if things go wrong!
Online now: No Back to the top
1 guest and 0 members have just viewed this.