Permission denied and chmod for JDK installation in Linux

Source: Internet
Author: User

I. Problems Found

When JDK. Bin is installed in Linux, an error is reported./config. sh: Line 103:/home/JDK. Bin: Permission denied.

Modify permission: chmod 775/home/JDK. Bin


Ii. Explanation of CHMOD commands

File/directory permission setting command: chmod is used to change the access permissions of files or directories.


Usage 1: The syntax format is: chmod [who] [opt] [mode] File/directory name
Which indicates the object, which is one or a combination of the following letters:
U: indicates the file owner.
G: indicates the same group of users.
O: other users
A: indicates all users.

Opt indicates the operation, which can be:
+: Add a permission.
-: Cancel a permission.
=: Grant the given permissions and cancel the original permissions.

Mode indicates the permission:
R: readable
W: writable
X: executable

Read and Write Permissions On file a.txt for users in the same group: chmod g + RW a.txt


Usage 2: digit setting

The number setting rule is simpler: chmod [mode] file name. Generally, there are three numbers: the first number indicates the permissions of the file owner, the second number indicates the permissions of other users in the same user group as the file owner, and the third number indicates the permissions of other user groups. There are three types of permissions:

Read r = 4 = 100
Write W = 2 = 010
Run x = 1 = 001

In combination, there are also readable executable RX = 5 = 4 + 1 = 101, readable writable RW = 6 = 4 + 2 = 110, readable writable executable rwx = 7 = 4 + 2 + 1 = 111, each decimal number indicates the read/write executable permission of a user. If 774 is changed to binary 111 111 100, 1 indicates that the user has the permission 0, indicating that the user has no permission. 111 indicates that the user can read and write the file, and the corresponding 100 indicates that the user has only read-only permissions on the file.

 

Original post address: http://hi.baidu.com/xinzao/item/7fe0442684b67fc9ee10f1e9

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.