How do I set up my network shares

Questions about Wi-Fi and other network devices, file sharing, firewalls, connection sharing etc
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
joschhh
Level 1
Level 1
Posts: 4
Joined: Wed Jun 07, 2017 5:17 pm

How do I set up my network shares

Post by joschhh »

Good evening, Mint friends,
I have following plan, do you agree or what should I change ?

I have :
* One Synology NAS with shares exposed via WebDavS, NFS and Apple Talk, e.g. "media" and "docs".
* Two Linux notebooks
* Four users with individual accounts on the linux mashines and on the NAS.

The idea:
when user1@linux logs into MINT. the share "media" is automatically mounted on ~/pictures/NASmedia, using the user1@NAS credentials.
when user2@linux logs into MINT. the share "media" is automatically mounted on ~/pictures/NASmedia, using the user2@NAS credentials.

My plan:
For each user
1) create mountpoints ~/pictures/NASmedia and ~/documents/NASdocs
2) create bash script to mount shares using credentials for user
a) granting "sudo mount" to users & calling "mount" command
b) using FUSE
3) execute bash script each login

Is there an easier way to achieve this?
Could I exchange password authentication for certificates or something? (Storing passwords hardcoded is not nice)

THanks in advance, Josh
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Use the rigth tools right ;-)
djph
Level 7
Level 7
Posts: 1950
Joined: Thu Jun 27, 2019 5:43 am
Location: ::1

Re: How do I set up my network shares

Post by djph »

NFS mounts (and, frankly remote shares in general) under Linux / Unix tend to work differently than you're probably used to with other systems.

A quick ddg search indicates that a Synology NAS SHOULD implement things in a manner that would allow a more straightforward approach:
  1. On the NFS Server, create directories owned by the proper UIDs & GIDs, with correct permissions
  2. Set up the mount point in the /etc/fstab to auto-connect to the share when the machine is booted
  3. Symlink from the relevant user (1 or 2) to their specific directories as you mentioned (pics, docs, etc.)
  4. If anything is truly shared between U1 and U2, make sure they're part of an extra "nfsshare" or something group, which in turn has write access to their common directory.
  5. Repeat the exact same process on the other machine.
NOTE -- I've only glanced through their documentation, and didn't see anything jump out that would indicate that Synology's NFS systems behave in such a manner as to prevent you from creating a hierarchy like:

Code: Select all

Synology:/srv/shared #accessible, in read-only fashion to all
  ... /User1 # "User1" directory and all subdirs only accessible to UID=1000
    .../Documents
    .../Pictures
    .../whatever
  .../User2 #"User2" directory and all subdirs only accessible to UID=1001
    .../Documents
    .../Pictures
    .../whatever
  ../CommonShare #"Common" directory (and all subdirs) accessible to GID=990 "nfsusers"
NOTE2 -- I'm only referencing "User1" and "User2", you can repeat this for as many users are are necessary ;)
Locked

Return to “Networking”