English 中文(简体)
如何管理对持久性有机污染物的许可?
原标题:How to manage permissions on Linux folders?

I m 稍微混淆不清的是,允许使用六氯环己烷。 I m 配置了一个吉特中央储存库,供用户使用SSH。 Im using filesystem ACLs (link) and regular linux granteds. 我打算做的是:

  • Find a way in that only the users that I want will be able to list/read/write/execute the dir "/var/github" (in a way that I assign a group to the user that I want to give this kind of permissions)
  • The user "git" is the only user that can create new folders in "/var/github"

This is possible to do? Somes clues on how to do it?

最佳方面,

最佳回答

You can use access control lists to grant access to multiple groups. Here s an example session (using Ubuntu, but it should be the same for CentOS) that gives the grp1 group read access and the grp2 group read, write and execute access:

$ touch foo
$ setfacl -m "g:grp1:r--,g:grp2:rwx" foo
$ getfacl foo
# file: foo
# owner: me
# group: me
user::rw-
group::r--
group:grp2:rwx
group:grp1:r--
mask::rwx
other::r--
问题回答

现在只有集团<代码>git。 可读到文件夹,只有用户代码/code>可加以修改。

确保与用户“git”一起有一个“git”小组。 将所有用户添加到你们可以接触的群体中。 将贵目录的所有权性质改为用户和群体,然后改为750份。 所有权和指挥方式如下:

chown git:git /var/github
chmod 750 /var/github

允许750名用户在文件夹中做很多事情,只有“git”成员在阅读和可能执行该文件。 你们使用什么方案和指令来管理用户,由你们负责。





相关问题
Signed executables under Linux

For security reasons, it is desirable to check the integrity of code before execution, avoiding tampered software by an attacker. So, my question is How to sign executable code and run only trusted ...

encoding of file shell script

How can I check the file encoding in a shell script? I need to know if a file is encoded in utf-8 or iso-8859-1. Thanks

How to write a Remote DataModule to run on a linux server?

i would like to know if there are any solution to do this. Does anyone? The big picture: I want to access data over the web, using my delphi thin clients. But i´would like to keep my server/service ...

How can I use exit codes to run shell scripts sequentially?

Since cruise control is full of bugs that have wasted my entire week, I have decided the existing shell scripts I have are simpler and thus better. Here is what I have so far svn update /var/www/...

Good, free, easy-to-use C graphics libraries? [closed]

I was wondering if there were any good free graphics libraries for C that are easy to use? It s for plotting 2d and 3d graphs and then saving to a file. It s on a Linux system and there s no gnuplot ...

热门标签