Umask settings cause an app in WebLogic to upload files without permission to open

Source: Internet
Author: User

Last year, Web apps deployed on one of the company's WebLogic did not have read permissions after uploading files. Because WebLogic was deployed on Linux, the upload file was mounted on a Windows Server with NFS installed.

At that time I just graduated, did not have much experience, looked for a long reason to find out the reason is in the WebLogic. Just modify the WebLogic startup shell script or the WebLogic node to start umask in the shell script.

Linux, WebLogic uploaded files or directories created by default only read by themselves or group members read, but the Web access to directories, usually need to execute permissions, so you need to start the script configuration in WebLogic, Find Startweblogic.sh,vi It, modify the value of Umask to modify the default permissions to create a file or folder. By default, files and directories are created, and files do not have X permissions, that is, execute permissions, and the directory has X permissions. 1, Umask
Meaning: The user creates a mask for a file or directory
Purpose: Create a file or directory permissions to generate a file or directory with this umask value specifically as follows
File default permissions =666-$umask bitwise minus
Directory default permissions =777-$umask bitwise minus
Attention:
In administrator mode, the value of Umask is 022, and the administrator user UID is less than or equal to 99.
In normal user mode, the value of Umask is 002, and the normal user UID is greater than or equal to 100.
If you set Umask to 027, when you create a file, the file permission is 64 (-1), and the negative number is 0 to 640. If Umask is set to 037, file permissions will appear when the file is created, where 3 means that the file has write and execute permissions, but the file does not have execute permissions by default, the group permission plus 1 becomes 640来 to prevent this from happening; When you create a directory, the directory permission is 740. Where 4 means that the directory belongs to the group only read permission, by default the directory has the Execute permission, but does not modify, the directory permission is still 740.

Umask settings cause an app in WebLogic to upload files without permission to open

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.