[K12OSN] Re: Permissions Question
Daniel Button
button at gti.net
Wed Apr 7 18:46:48 UTC 2004
Jim,
I believe that your problem is how the user id are created. I would
guess that the line in /etc/passwd shows that the user is given an id
and put in a group of the same same name. An example is a follows:
/etc/passwd:
kdanb:x:500:500:Daniel Button:/home/kdanb:/bin/bash
/etc/group:
kdanb:x:500:
Now do an ls -la of /home
drwx-- 41 kdanb kdanb 4096 Apr 7 14:29 kdanb
If I understand what you want, you need to change the group entry in
/etc/passwd. The user's primary group needs to be changed to the
teachers group. I would not add the users in the /etc/group entry
though unless the teachers group is something that the students can't
use to make mischief.
/etc/passwd would look something like this:
kdanb:x:500:1:Daniel Button:/home/kdanb:/bin/bash
Now anytime the user create a new file or directory the ls -la entry
will look like this:
drwxr-xr-x 2 kdanb bin 4096 Apr 7 14:36 tmp3
>From a security standpoint, I don't think you want to do this, but it
does give what you ask for. I don't recommend it!!
Dan
On Wed, 2004-04-07 at 12:10, Jim Hays wrote:
> I am almost embarrassed to ask this question, but since I have never met
> any of you face-to-face, I guess I can ask a "dumb" question.
>
> Scenario: (K12LTSP server as a file server for the school. Term Server
> is a different box.) Middle School. Student Home Folders in /home
> partition. Folders in subdirectories by graduation year. For example,
> a student named Joe Cool in the class of 2008 has a folder
> /home/students/2008/coojo08. His username is coojo08. Folders are
> owned by the student and the group for the folders is teachers.
>
> The problem: When a student creates a file in his/her folder, the files
> is "owned" by the student as owner and by the student as group. I need
> to have the group for these files be teachers.
>
> What do I do to make it so that files created by students in their
> folders are accessible to teachers who are in the teachers group?
>
> Here is what a file looks like now:
>
> -rw-rw-r-- 1 woobr08 woobr08 21504 Apr 7 10:13 Stocks.xls
>
> I need it to be
>
> -rw-rw-r-- 1 woobr08 teachers 21504 Apr 7 10:13 Stocks.xls
>
> TIA for any advice.
>
>
>
More information about the K12OSN
mailing list