File permissions control for Linux

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.