Mac Brew installation PHP extension error: Parent directory is world writable but not sticky

Source: Internet
Author: User
Tags mcrypt parent directory

$ Brew Install Php70-mcrypt

Error:

Error:parent directory is world writable and not sticky

Search for the answers to GitHub

https://github.com/Homebrew/legacy-homebrew/issues/40345

Reason:
/tmp directory permissions are incorrect

$ ls-ld/private/tmp

Print it out,/private/tmp is marked yellow.

Workaround:

$ sudo chmod +t/tmp

$ ls-ld/private/tmp

Print out/private/tmp is marked green, should be said to be normal meaning

Execute again

$ Brew Install Php70-mcrypt

Installation Successful

Knowledge Points:

chmod +t

+t to set the sticky bit (sticky bit) to prevent files or directories from being deleted by the non-owner

Set UID, a detailed description of the three permissions of the Gid,sticky bit:

A file has an owner that indicates who created the file. Also, the file has a group number that represents the group to which the file belongs, typically the group to which the file owner belongs.

If it is an executable file, at execution time, the file typically has only the permissions of the user who called the file. And setuid, Setgid can change this setting.

Setuid: Sets the permission to have the file owner in the execution phase of the file. The typical file is/usr/bin/passwd. If the file is executed by an average user, the file can be rooted during execution so that the user's password can be changed.

Setgid: This permission is valid only for the directory. After the directory is set, any user who creates the file in this directory has the same group as the group to which the directory belongs.

Sticky bit: This bit can be understood as an anti-delete bit. Whether a file can be deleted by a user depends primarily on whether the group to which the file belongs has write access to the user. Without write permissions, all files in this directory cannot be deleted and new files cannot be added. If you want users to be able to add files but cannot delete files at the same time, you can use the sticky bit bit for the file. When this bit is set, the file cannot be deleted even if the user has write access to the directory.

Mac Brew installation PHP extension error: Parent directory is world writable but not sticky

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.