Linux operating system skills and Applications

Source: Internet
Author: User

With the rapid development of the network, many of us cannot do without the network. This has led many people to learn computer knowledge. For example, many people learn the Linux operating system. When learning the Linux operating system, you will often encounter problems. The problem described today is to use Squid to control file access.

A major benefit of Linux is that it can easily Route IP networks. Many Linux systems are dedicated to Internet access routers. However, package filtering software such as iptables or ipchain can only control which websites the user accesses, but cannot control which files the user accesses. Using Squid, the agent server software in Linux, can easily achieve this. The urlpath_regex In the Squid. conf file controls access to each registered MIME file, for example, the following statement:

Lists the MIME file types for access control (the access control list is the acl)

Acl denymine urlpath_regex. exe. zip

Prohibit Access to such files:

Http_access deny denymine

In this way, all users after this statement are prohibited from accessing the zip and exe files of the corresponding site. Of course, you can add other file types, such as MP3 files. Use the ReDirect redirection function such as iptables to force users to access the Internet through the Squid proxy, that is, the so-called "transparent proxy", to completely control users' access to the site.

The system uses the default color file display. The color display of different types of files on Linux makes us feel very convenient, but sometimes this function may be accidentally lost, add alias ls = "ls -- color-F-N" to the configuration file to ensure the normal use of this function.

Cron is used to maintain the activation status of certain partitions. cron is equivalent to the scheduled task of Win 98. It can regularly execute certain commands according to user requirements. If you mount some NTFS partitions and frequently access this partition (such as Web Server access to some files), it is very likely that the data cannot be correctly read and written due to a long time, at this time, you can use cron's timed access function to ensure that the partition is always active. In my personal experience, it is recommended that the NTFS partition on the network be accessed every 15 minutes by cron. Otherwise, the mount failure may occur when the partition data is required.

You can use Squid to control file access in Linux.

  1. Why is it "GNU/Linux"
  2. Linux Manual: Fedora Linux
  3. Linux notes: Linux Command lines for three websites
  4. London securities launches the Linux operating system platform
  5. A variety of Linux from Linux individual developers

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.