Protect your Sqlite database (SQLite database security tips)

Source: Internet
Author: User

SQLite has no restrictions on the Authorization protocol and supports most of the standard SQL 92 statements. We believe more and more people will use this database.
The combination of PHP and SQLite is just like the combination of ASP and ACCESS in the past. ACCESS can be maliciously downloaded, and SQLite cannot be spared because SQLite is also a binary file, as long as the WEB can be accessed, it can be downloaded.
ACCESS can use some tricks to prevent users from downloading, or SQLite. This section describes several common methods to prevent SQLite from being downloaded.
1. Place SQLite in a place that is inaccessible to the WEB.
Some virtual hosts generally provide a separate directory for users to put files that do not want to be downloaded or accessed, so it is safe to put them in this directory. Ilia also provides another method, which is similar to ACCESS.
Change the file extension of the SQLite database to. php, and create a table in the database using the following method:
Create table, a PHP parsing error message will appear when anyone accesses the file, thus preventing users from downloading.
2. If PHP runs as a separate CGI or APACHE process
You can modify the permissions of SQLite database files, such as 0600.
3. If the WEB server is APACHE and supports custom. htaccess, You can add the following content to the. htaccess file:
Deny from all
Here,. sqlite is the extension of your database file.
4. The complexity of setting your database name cannot be easily guessed by others
Related Article

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.