accessing linux shared folder from node.js
This is a puzzling one.
I have a shared folder on a PC running SolydXK(Debian-based). Samba shares out the folder fine, and I can see it in the file manager from another PC on network running Debian 8. I have some code in node.js that needs a path to that folder to grab its contents. File manager shows it as "smb://solydx-dw/schedule", but when I feed that to the fs.readdir() function in Node, it chokes. Invalid directory.. I went looking for a mount point for the share, but could not find one. I also read that linux no longer uses mount points for network shares... How can I get a valid path to use for this? Thanks for any ideas.. |
file managers use a built in samba client virtual file system so you don't have to be root or have a line in the fstab file to access remote shares but you can still use mount points. It might be accessible /run/user/... but only if it is mounted by the file manager first.
In your case I would mount it via fstab. |
Thanks
Hi Michaelk,
Good suggestions. I found a workable solution, using mount.cifs . This allowed me to mount the remote share in /media, which gave me a path to use. And it works just fine. If I have to retain the association more permanently, I'll use your fstab solution. |
All times are GMT -5. The time now is 10:14 PM. |