Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
08-19-2017, 12:29 PM
|
#1
|
LQ Newbie
Registered: May 2017
Location: Fairfield, Iowa, USA
Distribution: SolydX 10 2019-09
Posts: 21
Rep:
|
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..
|
|
|
08-19-2017, 01:23 PM
|
#2
|
Moderator
Registered: Aug 2002
Posts: 26,472
|
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.
|
|
|
08-21-2017, 12:02 PM
|
#3
|
LQ Newbie
Registered: May 2017
Location: Fairfield, Iowa, USA
Distribution: SolydX 10 2019-09
Posts: 21
Original Poster
Rep:
|
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 06:13 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|