Yogesh Chauhan's Blog

How to set the permissions on all files and folders in Mac?

in Miscellaneous on May 10, 2020

If you are having problems like file writing or opening with PHP in mac then you should consider changing the permissions on the folders.

All Permissions (Read, Write, Execute)

Considering you want to give all the permissions to everyone, you can use this


sudo chmod -R u+rwX,g+rwX,o+rwX /path/to/your/folder

The -R flag applies the change to all folders and files recursively.

Using the rwX symbolic mode will add read and write (rw) permissions for the user (u), group (g), and other users (o), and optionally permit execution (X) of files if they are already executable for somebody or if they are a directory.

This is equivalent to the 777 mode, except with a smarter executable bit.

You are going to need superuser permissions to execute this command so to run this command as root we are prefixing it with sudo or you might get any 'permission denied' errors when running it.


Most Read

#1 How to check if radio button is checked or not using JavaScript? #2 How to add Read More Read Less Button using JavaScript? #3 Solution to “TypeError: ‘x’ is not iterable” in Angular 9 #4 Solution to the error “Visual Studio Code can’t be opened because Apple cannot check it for malicious software” #5 How to uninstall Cocoapods from the Mac OS? #6 PHP Login System using PDO Part 1: Create User Registration Page

Recently Posted

#Apr 8 JSON.stringify() in JavaScript #Apr 7 Middleware in NextJS #Jan 17 4 advanced ways to search Colleague #Jan 16 Colleague UI Basics: The Search Area #Jan 16 Colleague UI Basics: The Context Area #Jan 16 Colleague UI Basics: Accessing the user interface
You might also like these
How SCSS (Sass) finds a module without a file extension?SCSSHow to vertically align a html radio button to it’s label?CSSHow to update or disable WordPress Post Revisions?WordPressHow to Use SQL MAX() Function with Dates?SQL/MySQLHow to use a Subquery to Insert Multiple Rows in SQL Table?SQL/MySQLWhat’s a Closure in JavaScript?JavaScriptJavaScript Input Validation Theme Park Example using throw StatementJavaScriptHow to create a pricing table using flex in CSS?CSSHow to invalidate all existing cookies using Security Keys in WordPress?WordPressCrypto.getRandomValues() method in JavaScriptJavaScriptHow to change perception and behavior of a person for acceptance of new systems?MiscellaneousWhat is a Strict Requirement in PHP 7 Function Declarations?PHP