Permissions for file access under 25_android

Source: Internet
Author: User


Write file: FileOutputStream fos = context. Openfileoutput ("Private.txt", Context.mode_privatr), parameter 1 file name, parameter 2 permission mode.

File permissions under the Linux system.

Position 0-Representative file
D Stands for Directory
Under normal circumstances, every application under Android is a standalone user with a separate group.
Position Current User R readable W writable x executable
Position 4~6 Current user's group R readable W writable x executable
Location 7~9 permissions of other users


----------0 000
0 000 000 000

-rw-------0 600
0 110 000 000 because 110 corresponds to a decimal that is 6, the permission is 600

-Rw-rw-rw-0 666

Modify Permissions command: chmod full name: Change mode

Permissions for file access under 25_android

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.