LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-07-2013, 05:32 AM   #1
D0M1N1C
LQ Newbie
 
Registered: Aug 2005
Posts: 25

Rep: Reputation: 15
Best solution for shared mounting in a multi-user environment


Hi.

I have a webserver (sausage) which mounts the bulk of its storage from a fileserver (pudding.) At the moment, on sausage, I mount /mnt/data -> //pudding/data then also on sausage, bind mount /srv to /mnt/data/srv. However, I can't get the mounts setup up such that when a web user SSH's into a chroot jail located under /srv/www/clients/clientx/weby (using jailkit) they still have adequate permissions.

The issue is I can't find a way to mount it such that it doesn't force a single UID/GID across all of /srv. I understand the problem I'm facing is exactly how it's meant to work - it's a security feature.

In it's current state, a user can connect, browse and edit files they own, yet if they try and create a new file, it creates a 0 byte file with root:root owner (as thats the GID/UID of the lowest level mount.) Since the file is not owned by the user, they can't edit or write to the file. If I chown the new file over to the user, they can edit it fine after that, just not create them.

Ideally I'd like the user to be able to install and use php scripts such as composer, but trying to do that at the moment doesn't work, because extracting the files fails in the same way (e.g. lots of errors and 0B files)

The ideal solution would be individually mount each of the users directories and set gid/uid like that. However, each user has 4 directories they need, and there is a limit of 255 mount points for a single file system (as discussed here: http://serverfault.com/questions/464...any-nfs-mounts)

Currently the mount is a CIFS mount, but I've tried it with NFS also and can't figure it out.

It's similar to the issue described here:
http://www.linuxquestions.org/questi...er-4175464867/
Except I'm more flexible (as in I'm not restricted to samba) yet have the extra restriction of using jailkit (e.g. post #2 in that thread suggests something including chmod 777 which jailkit wont allow - "not a secure chroot")


Thanks in advanced
 
Old 07-04-2013, 05:13 PM   #2
SaintDanBert
Senior Member
 
Registered: Jan 2009
Location: "North Shore" Louisiana USA
Distribution: Mint-20.1 with Cinnamon
Posts: 1,771
Blog Entries: 3

Rep: Reputation: 108Reputation: 108
I'm still working to learn CIFS. However, in the NFS world, each local process has a UID/GID on the workstation. A mapping happens between that user on that host and some remote user on the server. Even my NFS knowledge has a lot of rust and barnacles.

This article might get you started: Mapping Local UID/GID to Mounted NFS Share.

Here is a second article that offers more information. mounting NFS directory with read write access.

I hope these allow you make some progress.

Cordialement,
~~~ 8d;-Dan
 
  


Reply



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: Crazies: Linux w/o Ethernet, Multi-Monitor, Multi-User LXer Syndicated Linux News 0 09-07-2012 10:51 PM
A secured multi user environment dor Linux - Security 4 05-30-2010 09:00 AM
Multi-User shared folder... permission help? chmod etc? thecha Linux - Server 1 03-10-2009 10:56 AM
LXer: Linux 101: Manage user accounts in a multi-user Linux environment ... LXer Syndicated Linux News 0 06-27-2006 07:03 AM
Setting up a multi-user programming environment pembo13 Linux - General 3 01-16-2006 12:21 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:47 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