LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 05-26-2015, 04:55 PM   #1
jtylers
LQ Newbie
 
Registered: May 2015
Location: USA
Distribution: Debian
Posts: 7

Rep: Reputation: Disabled
Obtaining correct quota information in Samba


The main problem is that if a user has used up their home directory quota, then they are unable to write to group directories as well.

I have a samba server that obtains user information from an LDAP server and then maps that user to their home directory within an NFS server.

Users log in using windows thin clients and access all of their files through samba.

Currently, all group folders are shown as subdirectories of a "group" directory inside the users home directory.

If there was a way to enforce folder quota rather than Volume quota from samba, then the problem would be solved.

I tried to solve the problem by not reporting quota to samba. The issue with this method is that the users can't see how much of their actual NFS quota has been used and don't know that they are almost full until they get an error message saying they can't write to their home folder.

Next I modified the smb.conf so that it would follow symlinks, but that makes it so that the size of the users home directory shows up as the sum of all their group folders and their home directory. To me this makes sense, but when a user sees that their drive has 10 GB of free disk space yet they cannot write to their home folder, they get confused.

Meddling with the "dfree" command also got me no where.

The last thing I tried was mapping every single group folder to a letter drive. This works as long as the user isn't part of 26 or more groups, which is not uncommon given that many of the users are professors, who create new groups every semester.

Does anyone know of another way to solve this problem?

Thanks in Advance
 
Old 05-29-2015, 05:32 AM   #2
dijetlo
Senior Member
 
Registered: Jan 2009
Location: RHELtopia....
Distribution: Solaris 11.2/Slackware/RHEL/
Posts: 1,491
Blog Entries: 2

Rep: Reputation: Disabled
Quota monitors file system usage, linux mounts file systems inside the directory tree as (effectively) folders. So if each if each group had it's own file system (which can be an LV or partition) then you'd be able to mount that file system as a folder (which can be mounted at login, much like the home directory) and you can enforce quota on those folders (not really, you're enforcing it on a file system, but the file system appears to the user to be a folder)

Hope that in some way helps

---------- Post added 05-29-15 at 06:32 AM ----------

Quota monitors file system usage, linux mounts file systems inside the directory tree as (effectively) folders. So if each if each group had it's own file system (which can be an LV or partition) then you'd be able to mount that file system as a folder (which can be mounted at login, much like the home directory) and you can enforce quota on those folders (not really, you're enforcing it on a file system, but the file system appears to the user to be a folder)

Hope that in some way helps
 
Old 06-01-2015, 03:47 PM   #3
jtylers
LQ Newbie
 
Registered: May 2015
Location: USA
Distribution: Debian
Posts: 7

Original Poster
Rep: Reputation: Disabled
Thank you so much for your input. I had an idea based on what you said. I wrote a perl script that parsed through all the users and found out what groups they were part of, and then created a main "groups" folder on NFS that had a folder for every user which contaied symlinks to the groups that each user belonged to. Needless to say it was a mess of symlinks. The system saw each group folder as its own volume and the problem was solved. However, with all the error checking in the script and automatic maintaining of groups folders, plus having over 10,000 users to parse through, my script takes well over 5 minutes to run. It's a great patch job, but something cleaner will be better in the long run. Does you know if there is a way to use reparse points through samba the way NTFS uses them?
 
1 members found this post helpful.
  


Reply

Tags
samba, samba mount permission, samba windows, samba4


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
obtaining the correct aws-keys: how to do that? sayhello_to_the_world General 3 03-09-2014 10:45 AM
[SOLVED] Obtaining memory access information VisionIncision Linux - Security 5 03-18-2013 04:13 PM
Users can't get own quota information - CentOS 5 sgb Linux - Server 3 01-13-2009 06:00 AM
Obtaining Adequate Network Information Woodsman Slackware 9 10-19-2006 05:12 AM
obtaining information about controlling devices infamous41md Programming 2 03-07-2004 12:24 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 12:24 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration