BASH. How to set different privileges for different groups (chmod)?

In General the task looks like this:
To configure access rights to the directory library and tests, so that the users in the group teachers can modify and create files there and users group students had read access.

I asked the owner using chown and group owners with chgrp.

It is clear that it is now possible to set permissions: chmod 124 filename.

But it turns out that the owner and one group of owners one! How to give privileges to 2m different groups?
I understand several owners can not be. Or am I wrong?
July 8th 19 at 16:12
1 answer
July 8th 19 at 16:14
in POSIX file systems, only one owner, only one group

But you can group teachers to give write permissions and everyone else read
Somehow it is not flexible - kaelyn52 commented on July 8th 19 at 16:17
In principle, flexible enough to solve all the issues with links.

But the advantages of such a decision - the number of bytes allocated for the various attributes is small and fixed, in addition, it is a POSIX standard, that is, for any filesystem in *nix. - Jeff28 commented on July 8th 19 at 16:20
Link per group) - mercedes commented on July 8th 19 at 16:23
For a start, why are these weird access rights to the file system? If something doesn't get set up comfortably, so you just incorrectly use the tool.

*nix - originally a server system. I find it difficult to assume that on the same machine running 10 different people and will fight for the keyboard.

If they get access remotely - it's NOT right the local file system and a thread of ftp or samba, which have their own settings with access groups, where you can configure hundreds groups or to connect such as ldap. - Jeff28 commented on July 8th 19 at 16:26
: Why and whether - question is also interesting.
I think this question was up many many times.
Don't administer, but I know that in Windows with the rights everything is more interesting out of the box,and it's nice - mercedes commented on July 8th 19 at 16:29
Linux samba or ftp is also out of the box

Please note my last paragraph.

If the wind whisking some folder, usually nobody suffers with the rights of the file system itself is unreasonable. Set up rights to the resource, that is, the right balls (samba)

This is actually one of the main reasons why the POSIX file system rights is more than enough to mediate access between users, kernel, and any service, everything else - makes a specific kind of service (ftp/samba/etc..)

In addition, it is much more correct because it allows to use any filesystem, without reference to him. On Linux and ntfs can be done and fat, why get attached to the file rights? - Jeff28 commented on July 8th 19 at 16:32
: I agree with that, but if number of users without sharing, then alas. Under Linux, it may not be the actual problem. - mercedes commented on July 8th 19 at 16:35
: So the fact of the matter is that I'm under Windows do not remember to require the file access to distinguish between.

In Windows is also all done through network drives/balls if you want to give access to other users and is not a file parmesani and shared access permissions.

The maximum that I've done on the shared disk created personal folder for each user that can access only it. Is enough the rights of users full access, others no access. - Jeff28 commented on July 8th 19 at 16:38
: look programs fails right) there are all sorts of twisthaler. So hard to say, not guided in this thread - mercedes commented on July 8th 19 at 16:41
Problems program fails associated with a device system inside.
In Windows to install and run different software, have to install all sorts of left library, which needs advanced rights.

In Linux the dependencies are installed easier and libs can ostanavlivatsya machine from trusted repositories, and the rest of the software in any userspace, and do not require human at all. - Jeff28 commented on July 8th 19 at 16:44

Find more questions by tags Command line