In a Linux environment collaborative development, there are a lot of situations, we need to set specific permissions for these accounts
We need to use ACLs here.
1. Add an account, set a password
Useradd terrypasswd Terry
2.acl settings:
2.1
Block view of software configuration:/usr/local The directory below mysql,nginx,php,mongodb2.6 these directories deny access
Setfacl-m u:terry:rx/usr/local/{mysql,nginx,php,mongodb2.6}
2.2
Block information on other items view: Under the development directory, just let it see the system directory you made, and others will block
Setfacl-m u:terry:-/www/web/develop/{e_commerce,dwz-ria,e_commerce_huang_di,yourls,phpmyadmin,onfancy.com, MARKET.ONFANCY.COM,MAGENTO2,MAGENTO,YIISPACE-MASTER,YII-MARKET_COPY_2014-11-12,YII2-HUANGDI,YII-MARKET,YII2}
2.3
Some of the sensitive directories in the system project are banned, and for the PHP system, you don't want developers to see all the code, so they can take the company's code
Here, we need to set it up so that he doesn't see some of the company's code files, which we can set through the ACL
2.4
Setfacl-m u:terry:- /www/web/develop/erp/myapp/code/core/erp/{sales,system,dashboard,adminlogin}
This allows you to block some files in your system files against the developer
This, for example: A,b,c three modules developed by three developers
You can let them only see their own modules, and not see other people's modules, so that the development environment can be safe, to prevent system code leakage.
2.5
In addition, the prohibition of PHP packaging features, not to pack it, so that the system files are packaged to be downloaded
Or, the development environment, prohibit download files can also.
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
File permissions control for Linux