Connecting to Router attached drive (5.15LTS Plasma)

Hi! Glad to be here! I’m going to refer to myself as a hands-off Linux user, although I’m not averse to using the Terminal or editing system files. :wink:

Been using Linux Lite for my home work PC, and thought I’d give myself an upgrade to Manjaro. I’m still setting things up, and one of the things I still need to accomplish is: to be able to access the shared drive attached, via USB, to our NightHawk Modem / Router.

Never had to do a thing, out of the box, to Linux Lite; but am wondering what Software I should have included during installation of Manjaro to be able to continue to be productive as before.

Would appreciate any assistance / wisdom that anyone can send my way. :wink:

TIA! MDP

If you want to have a hand made home server, I would suggest checking nextcloud

If you want to have a shared a local storage between windows, Linux in your local network, check samba project

If you want to access your usb from another computer , you may try:

  1. If both devices are on the same network: try ssh, telnet

  2. If both devices are on different networks :

  • VPN approach: Zerotier, Tailscale

  • Port Forwarding

I recommend going for the vpn aproach since its the easiest one by far, doing a port forwarding is not always a solution, it depends if your ISP allow you to open ports

You didn’t say which desk top your using.If your using Plasma it should work. On Gnome make sure avahi is running and it should show the drive on the router.Those are the only desktops I have used but I have a couple NightHawk routers and can plug in a drive or printer and have had no issues.

Guess I’m getting old I missed the part your using Plasma.As I said I have 2 routers and both will show up in Network.

Pay attention to the Client section and the Troubleshooting section regarding routers.

Thanks all! I’ve been “off-line” for some days, and am getting back to it only just now …

Here’s my progress, so far; I issue the following cmd, and I can get in to the drive:

sudo mount.cifs //{url of local drive}/{folder name on local drive} /mnt/share/nmshare -o user={name of user on Router} (I previously created the “/mnt/share/nmshare” folder)

I simply issue this each time I power up. :slight_smile:

Until today, I had full access to all sub-folders on this drive; today I do not: I receive an error msg indicating that I don’t have permission (any more …??).

So, I have a new question: How do I give myself Permissions (the appropriate fields in Properties are greyed out).

Thanks in advance! MDP

I’d like to bump this question back again …

If I issue a “sudo mount.cifs //192.168.0.1/USB_Storage /mnt/share/nmshare -o user=admin” I can see all my files …

But …

Attempts to SAVE to any of these folders, yield no messages AND no changes to those files.
Attempts to COPY files to these folders return a bold-type message indicating that I do not have Permission.

Issuing “sudo chown -R $USER:$USER /mnt/share/nmshare” takes a few minutes, but changes nothing.

I have zero such problems using LinuxMINT (I have dual-boot); but I want to use Manjaro because, in recent months, I need to be able to TeamViewer over to my elderly parents’ house, and am unable to do so under MINT.

So, this distro needs to be my everyday work machine.

I’m going to go back through this thread and re-review the hyperlinks; but am hoping that someone can spot a mistake I’m making and offer a 1-line cmd to get me up and running.

TIA! MDP

Thanks for the pointer to Samba Setup … I’m kinda time constrained, though, so disinclined to spend the necessary effort to go through this admin-level sort of documentation …

I can easily Mount the drive and see all files; so I expect my true question is:

How do I get R/W permission?

MDP

You have to realize that in order to help, it goes both ways. It’s still not clear how you setup the share on your NightHawk router. (Original factory firmware? Flashed a third-party firmware, such as FreshTomato? Recently upgraded the firmware?)

Does the user “admin” actually exist on the router, or is it “root”? (I believe there was a change to FreshTomato in which “admin” is no longer a default alias for “root”.)


There’s nothing in there that specifies file_mode or dir_mode. Is the drive connected to your router formatted as NTFS / exFAT / FAT32? Or is it formatted in a native Linux filesystem?

You can try adding the mount options file_mode=775 and dir_mode=775

This will default to full read-write-execute access for the owner and group.

And everyone else has 24/7 free time to cater to poor people like you who doesn’t have 10 minutes to read something.

2 Likes

Ah … But it’s not just 10 minutes is it: When I encounter a term or concept that I’m unfamiliar with, I need to branch out and do more research, learn some new concepts, understand (arcane, silo’d) terminology, etc. Go from being a 1st day in class student, to being an “A” student. Then after some days later, I might be on the same page as the author(s).

And that would be all the while catering to business customers, needy family members (did you see the mention of elderly parents?)

So … um … no. This really, really needs to be turn-key. Otherwise it will be a few more months before I get back to it. (SMH)

Thank you very much for your thoughtful and consider-ate reply, I really appreciate it! :wink:

“admin” is, indeed, the user as set up on the modem (in fact, I am able to Read all files on the attached drive). Pretty sure they are FAT32; don’t believe they’re NTFS.

When I issue the mount, I am prompted first for the Root User pw, then for the drive pw.

I will try to add the file_mode and dir_mode options. MDP

So you treat the community as a resource because you are too lazy and wanna be spoonfed?

The result of being spoonfed is foie gras

Ensure correct permissions on your mountpoint

EDIT - of course, above is assuming your router shares a writeable share.

1 Like

Oh, well … Adding the file_mode and dir_mode options didn’t seem to improve the situation

“sudo mount.cifs //192.168.0.1/USB_Storage /mnt/share/nmshare -o user=admin file_mode=775 dir_mode=775”

When I right click on properties for the nmshare folder, permissions say that the owner is Root and has R/W, but the Group shows Root and Access is Read-Only, and Others also says Read-Only.

I seem to not be understanding “ownership”:

Did I use the chown cmd properly?
Must I issue it at each re-Boot?
Etc.

And thanks, again, for your assistance and consideration… MDP

If you are using system folders for mouting there is no way you can control the permissions.

TL:DR

You can use the utility script mentioned in the troubleshooting topic

create a separate structure

In the topic linked previously it is suggested you create a separate structure e.g.

mkdir -p /a/smb/nmshare

The you can control the local permissions for the mountpoint

sudo chmod ugo+rwx /a/smb/nmshare

mount the share

Then mount the share in the folder using a mount unit

First create a folder to hold your credentials for the server

sudo mkdir -p /etc/credentials

Secure the folde to root acess only

sudo chmod 700 /etc/credentials

Create a file in the folder to hold the credentials - for convenience name the file as router-share-user

sudo touch /etc/credentials/router-share-$USER

Edit the file using your favorite editor

kate /etc/credentials/router-share-$USER

Insert the following lines a total of 3 (three) lines - content in that order - and save the file. The following is an example based on your comments

admin
WORKGROUP
your-router-password

Create a file with a name matching the mount point

sudo touch /etc/systemd/system/a-smb-nmshare.mount

Edit the mount unit using your favorite editor

kate /etc/systemd/system/a-smb-nmshare.mount

Insert the following content - replace $USER with the actual username e.g. admin

[Unit]
Description=Router share

[Mount]
What=//192.168.0.1/USB_Storage
Where=/a/smb/nmshare
Type=cifs
Options=_netdev,iocharset=utf8,rw,file_mode=0777,dir_mode=0777,credentials=/etc/credentials/router-share-$USER,vers=NT1
TimeoutSec=30

[Install]
WantedBy=multi-user.target

You may not need the part specifying the protocol version - it is there because routers with old firmware uses the insecure SMB1 which was renamed to NT1 to provide backwards compatibility.

TEST the share by starting the mount unit.

sudo systemctl start a-smb-nmshare.mount

Navigate to the folder /a/smb/nmshare using your filemanager. You should now see the content of the share - if not check your credentials. Test if you can create a new file - then delete the file.

workstation

IF this is a workstation - always connected to the router - continue to enable the unit at boot - otherwise continue in next section

sudo systemctl enable a-smb-nmshare.mount

laptop

IF this is a laptop which may or may not be conected to your home network stop the mount unit

sudo systemctl stop a-smb-nmshare.mount

do not enable the mount unit but create an additional automount unit

sudo touch /etc/systemd/system/a-smb-nmshare.automount

Edit the file and insert the following content

[Unit]
Description=Router share

[Automount]
Where=/a/smb/nmshare
TimeoutIdleSec=10

[Install]
WantedBy=multi-user.target

Then enable and start the unit

sudo systemctl enable --now a-smb-nmshare.automount

Navigate to the folder /a/smb/nmshare and it will mount in the background and unmount after an idle time of 10s.

Thank you! With your permission, I’m going to print this out and keep it in my folder. MDP

In the meantime …

Shortly after my Post (before today), I was able to find 2 different pages which explained differences between SMB, NFS, CIFS; these were very brief, and the key points were placed alongside one another in chart format.

(Editorial aside: these 2 seemed to differ as whether SMB or NFS is faster …??)

But … I also found the following page:
https://www.addictivetips.com/ubuntu-linux-tips/connect-to-servers-on-linux-kde-file-manager/

Using the following, in the Thunar browser location bar “smb://192.168.0.1”, I was able to readily access the folders and was able to edit and save changes to the files within those folders.

Those this was my turnkey solution (of course, I had already installed SMB, when I first installed Manajaro some months ago).

Add’l note (of importance): When I did the same in the Dolphin browser’s location bar, I was readily able to edit and save documents, but … subsequent accesses to the shared drive resulted in an error message (until after I had re-booted) when trying to get back into the folder that I had edited …???

Thanks, to all, for your patience and consideration!! MDP

Final editorial remark:

The purpose (uses) of a Forum is to get / share answers no matter the level of understanding of the individual(s) who ask questions; this is a given, going back to Compuserve days.

Questions that include language like: “Can I get a quick list ‘cause I don’t actually get what you’re talkin’ about”, do not make the individual who asked “lazy” … It just doesn’t.

If you look at the time gaps between my asking questions, without wondering “Why such a gap”, then you’re not taking into consideration that there may be non-lazy reasons for that. I’m trying to squeeze in a long slow learning curve while being responsive to clients and help them meet their deadlines. I don’t care if it takes you a very long time to log back in and help. But, I’m not asking everyone else to do my work for me. I’m not.

When I was coding, I also included supporting documentation … that was readable to junior people and to non-tech mgmt. Thanks to the engineers who programmed all the functions that make the various distros and desktops usable. But please ask an editor who is versed in good communication skills to help with the publicly available documentation.

It’s pretty obvious that I don’t know enough about, for example, this specific subject. So, naturally, I’m going to keep fishing around until I get a resource that I can understand. Does not make me lazy.

I shouldn’t have to say any more about this … When I first got into computers, there was a term we used: netiquette ===> This implies that this is a no-judgment zone.

Let’s keep it that way. Thank you

MDP

How is this the “Solution”?

For others who are trying to accomplish the same thing, you’re implying “use Thunar under KDE”?

What’s the secret found within those links that fix your problem that hasn’t already been discussed or explained earlier in this thread? (The article simply reiterates what was already explained, but with less nuance.) The smb:// protocol is what Dolphin uses by default, anyways.

You didn’t explain how you originally accessed your network share in the first post, and not until two weeks later did you attempt to use mount.cifs. Unless that’s what you were originally using? You’re likely to get mixed messages and tangents from other users when your opening post lacks sufficient information. You’re putting the burden on them to guess at every possibility of every scenario, and it’s somehow up to them to go out of there way in this fruitless process of elimination, had they only been given the proper information ahead of time…

In all seriousness, I’m even more confused re-reading this thread again.


“I’m having a problem with my car. It won’t start.”

“Do you hear a click when you turn the key?”

“I don’t have the key. I lost it.”

“Then how can you start the car at all?”

“It doesn’t need a physical key! It’s a wireless security FOB.”

“Oh, okay, is the FOB’s battery dead?”

“No! I already changed its battery!”

“Oh, um, can you try with another FOB?”

“I already did!”

“Um, maybe the other FOB or this one isn’t programmed for your car, or somehow needs to be re-programmed?”

“I already did that for both of them!”

“Then I’m out of ideas, sorry. Maybe ask the mechanic.”

“Hey, everyone! I fixed it. The button near the steering wheel was stuck, but after tapping it with my finger a few times I got it unstuck. You need to hold in the button while using the FOB to start the engine. So that’s why it wasn’t working before, since the button near the steering wheel was stuck.”

“Why didn’t you share all of the above information from the very beginning?!”


If you remove the greeting and off-topic stuff about “Linux Lite”, this is literally your opening post.

What do you expect others to make of it, let alone offer real help from this?

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.