LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 06-07-2021, 03:29 AM   #1
brainchild
LQ Newbie
 
Registered: Jan 2019
Posts: 29

Rep: Reputation: Disabled
remote mount that preserves permissions


I have a NAS appliance (Synology DiskStation), which exposes file shares through a variety of common protocols, including NFS and SMB/CIFS. The device has its own user set and permissions system for the files.

I also have a Linux server on which I wish to mount a share remotely. The server has users of the same names as those on the device. I wish the mount to occur automatically when the server starts, and to present the same file permissions to its local users as on the device. In this sense, the files would appear just as local files, that is, always available, and with per-file permissions respected.

I am not currently operating a domain.

To the extent possible, I prefer to avoid the following:
  • Changing the UIDs of any users on the server.
  • Exposing any shares to unauthenticated access.
  • Any complex configuration of a domain.

What is the best approach?
 
Old 06-07-2021, 09:02 AM   #2
uteck
Senior Member
 
Registered: Oct 2003
Location: Elgin,IL,USA
Distribution: Ubuntu based stuff for the most part
Posts: 1,177

Rep: Reputation: 501Reputation: 501Reputation: 501Reputation: 501Reputation: 501Reputation: 501
I am using fstab with a credentials file so the backup directory is mounted automatically.
Code:
//server/share  /media/backup   cifs    credentials=/root/smbcredentials,iocharset=utf8,vers=3.0 0 0
You can make an entry for each user and have it mount the share in their home directory. But this does mean that there needs to be a copy of their Synology username and password on the server for this to work, probably in each users home as well so they can update it when they change it.
 
Old 06-07-2021, 10:08 AM   #3
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,784

Rep: Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937
Windows and linux permissions are not compatible and therefore samba maps DOS permissions. samba defaults to map archive = yes and Synology appears to work the same. Although files will appear as local there permissions will not be "respected" if I understand your post.
https://www.oreilly.com/openbook/sam...k/ch05_03.html

With NFS permissions will be "respected" but I did not find anything easy to map local UIDs to Synology UIDs.
 
Old 06-08-2021, 07:46 PM   #4
brainchild
LQ Newbie
 
Registered: Jan 2019
Posts: 29

Original Poster
Rep: Reputation: Disabled
The suggestion of separate mounts for each user may be workable, but the requirement for provisioning explicitly for each user, in the mount table, causes some difficulties.

I think the approach has a further limitation, more subtle, but perhaps an even greater sense of difficulty. The shared files do not entirely comprise a set of subtrees, each corresponding to one user who has full and exclusive access to the contents. Rather, each separate item in the file tree has an ACL, and the system must enforce those privileges by accepting or denying users' access attempts the same as for attempted access on the file server.

Note the client understanding or modifying the permissions is not necessary, only that the server enforce them.

One more concern, as it seems that while CIFS has in some ways a more flexible permissions system for client access, I also recall that it lacks support for creating or modifying hard or symbolic links, which is a considerable limitation, and not found in NFS.

Last edited by brainchild; 06-08-2021 at 07:47 PM.
 
  


Reply

Tags
file sharing, nas, samba, samba mount permission, samba permissions



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: How UCLA Library preserves rare objects with open source LXer Syndicated Linux News 0 08-24-2019 08:02 PM
LXer: Open source mapping project preserves cultural heritage LXer Syndicated Linux News 0 08-01-2017 04:01 PM
Ubuntu: preserves config files? hydraMax Ubuntu 2 12-05-2011 04:37 AM
Mount. Umount. Mount. Umount. Mount. Umount. Mount.. cwizardone Slackware 10 03-22-2007 09:30 AM
cp -p preserves owner? Berhanie Linux - General 2 02-15-2004 10:00 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:33 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration