Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Security
User Name
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.


  Search this Thread
Old 11-26-2010, 05:58 AM   #1
LQ Newbie
Registered: Nov 2010
Posts: 1

Rep: Reputation: 0
Setting permissions on different groups.


I don't know if I can do this with linux.

We are a school and we share a samba folder with students and teacher groups. What we are trying to do is:
- Give students group users the permissions to rwx own files in folder
- Students must not be able to do anything with others files. I mean nothing so, at most, they could see the files in folder but not read it.
- Teachers can do anything with files in folder (this is the easy part :-))

As you can imagine, the idea is that students deliver their exams in that folder without the ability to read/copy the other students files.

With sticky bit we can restrict students permissions to their own files, that is ok, but how to restrict all the permissions on other students files without restricting student access to that folder?

Thanks in advance!
Old 11-27-2010, 05:50 AM   #2
Senior Member
Registered: Jul 2007
Distribution: Gentoo
Posts: 2,125

Rep: Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781
It may take some tweaking but I am sure this can be accomplished. I think the solution will require a combination of Samba security and linux file permissions. Each student will need their own directory, which you have. The permissions should have owner RWX permissions, but 'others' should not even have read capability. Using proper authentication in Samba, each student should then be restricted to their own directory. What I am not sure about is if each directory will need it own Samba configuration or if you can create a single share and make these sub directories. I think that should work, but you will need to confirm.

As far as the teachers go, I can think of two ways to approach this. First, as the 'root' user will have access to the files regardless of the permission, the teachers could either use sudo or become root and perform their actions. Do not give this capability to the students. Second, you could create a group for the teachers and assign file and directory permissions for that group.

It wasn't clear from your post what you had tried and what result you achieved. That information may be helpful in fine tuning a solution for you.


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
permissions and groups deadeyes Linux - Security 3 03-05-2007 01:24 AM
Help with groups / permissions Rustylinux Linux - General 7 02-19-2007 12:15 PM
creating groups, adding users, and setting permissions bowie101 Linux - Newbie 2 11-23-2005 12:42 PM
groups and permissions g_trueblood Slackware 2 10-07-2005 04:36 AM
problems with setting permissions for groups of files liontamer13 Linux - Newbie 5 03-10-2005 12:16 AM > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 04:54 AM.

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