Hi everyone -

I seem to be struggling with trying to understand exactly how Linux file permissions work. It took me hours to figure out a problem I was having today, and after I did fix it, I couldn't really understand why it actually worked.

I use the KDE desktop environment. Let's say that I create a folder, and for ownership, I give it the username lab and the group students. I set the permissions that the user "lab" and the group "students" have read/write access permissions for that folder. That works great. But, I also want to give read/write permissions to all users in the teachers group as well. I don't understand how to do this, I guess. I could put read/write access for "others", but that would mean that EVERYONE could read it and write it, right? I have another group named staff that should not have access to that shared folder.

We share folders and files via Samba. If I put the owernship of the folder as "lab" and the group "students", then the user account "lab" and all of the users in the "students" group can log in to that folder, read from and write to it. If I try to login as any teacher, it won't work, even though in Samba I've given write access to all of the teachers as well as the group "teachers". I understand that this wouldn't work properly because the folder's permissions don't have that group set.

I guess that I'm falling into my Microsoft Windows ways, when you could create a share, and assign as many users and/or groups as you needed. I'm sure you can do this in Linux, but I don't understand how to do it.

Basically, what I'm trying to do is to allow the user "lab", all of the accounts in the group "students" and all of the accounts in the group "teachers" to have read/write access to a folder. Can I accomplish this, and how would I go about doing it?

MANY thanks for your help on instructing the ignorant!

-Michael