- Mac os x terminal change folder permissions how to#
- Mac os x terminal change folder permissions password#
- Mac os x terminal change folder permissions mac#
The first set of letters, such as for the first line (Desktop directory), read drwx.
Mac os x terminal change folder permissions how to#
Here’s how to make sense of the permissions displayed within that window.
Mac os x terminal change folder permissions mac#
Using the -l option, the ls command on my Mac displays the following, for example: lserik-eckels-macbook-pro:~ Erik$ ls -l total 0 drwx-+ 3 Erik staff 102 Jul 3 14:20 Desktop drwx-+ 20 Erik staff 680 Jul 18 12:40 Documents drwx-+ 5 Erik staff 170 Jul 3 13:36 Downloads drwx-+ 37 Erik staff 1258 Library drwx-+ 5 Erik staff 170 Movies drwx-+ 6 Erik staff 204 Music drwx-+ 7 Erik staff 238 Pictures drwxr-xr-x 7 Erik staff 238 Apr 8 21:16 ProgramsAndApplications drwxr-xr-x+ 5 Erik staff 170 Apr 9 08:20 Public drwxr-xr-x+ 5 Erik staff 170 Sites drwxr-xr-x 12 Erik staff 408 Apr 3 11:31 Wallpaper erik-eckels-macbook-pro:~ Erik$ The ls command displays file and folder information. To get started, administrators must be familiar with the ls command. The command line enables enterprise administrators to view and edit all conceivable permission settings with surgical precision more quickly than using the Finder. Occasionally, though, administrators need to dig further while troubleshooting access, or more advanced configuration information associated with specific files or folders is needed, or they may need to make numerous changes. Often, basic file ownership and permission information is all administrators require. Many Mac administrators view and change file and folder permissions using the Finder’s Get Info window. Do not change this entry.Ģ55. Mac permissions via the command line to save timeĮrik Eckel explains the basics of the ls command, which displays file and folder information on the command line and allows you to edit permissions settings much quicker than using Mac's Finder. # localhost is used to configure the loopback interface If you ever make a mistake and you’re not sure how to fix it, you can always restore the default hosts file contents by using one of the methods above to enter the following default information: Our examples mentioned blocking and redirecting distracting sites in a work environment but you can also use these steps to manually block access to malicious websites and, of course, other uses as well. When you’re done making changes, press Control-X to exit the editor, Y to save, and Return to overwrite the existing hosts file.Īs we mentioned earlier, make sure to flush your DNS cache if you notice that your new mappings aren’t working properly. Because we launched Nano using sudo, any changes will be authenticated and saved directly to the original hosts file, without the need to copy it outside of its home directory.Ĥ. Just as we did with the TextEdit method above, we can add, edit, or remove hostname mappings at will. To navigate and edit the file in Nano, use the arrow keys on your keyboard.ģ. You’ll now see the hosts file open in the Nano editor or vim or another editor of your choice.
Mac os x terminal change folder permissions password#
As with all sudo commands, you’ll need to also enter your admin password to execute it: " sudo nano /private/etc/hosts“Ģ. To get started, launch Terminal, type the following command, and press Return.
The steps in the previous section are easy enough, but if you want to avoid copying the hosts file you can edit it directly in Terminal using the UNIX Nano Text Editor, which is built into macOS. Your Mac will then come through the speakers saying “DNS cache has been flushed.” How to Edit Your Mac Hosts File In Terminal With Nano
When you drop the hosts file back in its original location, macOS will ask you what to do about the unmodified hosts file that’s already there.