Remember to maintain security and privacy. Do not share sensitive information. Procedimento.com.br may make mistakes. Verify important information. Termo de Responsabilidade

How to Create and Manage Shared Folders on macOS

Shared folders are an essential feature for collaborative environments, allowing multiple users to access and modify files within a designated directory. In the macOS environment, creating and managing shared folders is straightforward, thanks to the built-in sharing capabilities. This article will guide you through the process of setting up shared folders on macOS, including examples and commands for advanced users.

Step-by-Step Guide to Creating Shared Folders on macOS

1. Using System Preferences

  1. Open System Preferences:

    • Click on the Apple logo in the top-left corner of your screen.
    • Select "System Preferences" from the dropdown menu.
  2. Navigate to Sharing:

    • In the System Preferences window, click on the "Sharing" icon.
  3. Enable File Sharing:

    • In the Sharing preferences pane, check the box next to "File Sharing".
  4. Add a Shared Folder:

    • Click the "+" button under the "Shared Folders" list.
    • Navigate to the folder you want to share and click "Add".
  5. Set Permissions:

    • Select the shared folder from the list.
    • Use the "Users" list to set permissions for each user (Read & Write, Read Only, or Write Only).

2. Using Terminal

For users who prefer command-line interfaces, macOS provides the sharing command to manage shared folders.

  1. Open Terminal:

    • Open the Terminal application from the Utilities folder or by using Spotlight (Cmd + Space, then type "Terminal").
  2. Create a Shared Folder:

    • Use the following command to create a shared folder:
      sudo sharing -a /path/to/folder -S "ShareName"

      Replace /path/to/folder with the actual path of the folder you want to share and "ShareName" with the desired name for the shared folder.

  3. Set Permissions:

    • To set permissions, use the chmod command. For example, to give read and write permissions to all users:
      sudo chmod -R 777 /path/to/folder
  4. Verify Shared Folder:

    • To verify that the folder is shared, use the following command:
      sudo sharing -l

Examples

Example 1: Sharing a Folder via System Preferences

  1. Open System Preferences and navigate to Sharing.
  2. Enable File Sharing.
  3. Add the folder /Users/YourUsername/Documents/SharedDocs.
  4. Set permissions to "Read & Write" for all users.

Example 2: Sharing a Folder via Terminal

  1. Open Terminal.
  2. Create a shared folder:
    sudo sharing -a /Users/YourUsername/Documents/SharedDocs -S "SharedDocs"
  3. Set permissions:
    sudo chmod -R 777 /Users/YourUsername/Documents/SharedDocs
  4. Verify the shared folder:
    sudo sharing -l

Conclusion

Creating and managing shared folders on macOS is a simple process that can be done through both the graphical user interface and the command line. Whether you prefer using System Preferences or Terminal, macOS provides the tools you need to set up and control shared folders effectively.

To share Download PDF

Gostou do artigo? Deixe sua avaliação!
Sua opinião é muito importante para nós. Clique em um dos botões abaixo para nos dizer o que achou deste conteúdo.