@alysson_lynch
To add to this, here are a few more details you might find useful:
- Recursive permissions: If you want the same permissions to apply to all subfolders and files inside the newly created folder, you can use the -R option with chmod. For example, chmod -R 754 foldername. Be careful with recursive changes, as they will affect all files and folders within the specified directory.
- Additional options for mkdir: The mkdir command offers additional options that can be used to set permissions explicitly when creating a directory. For example, you can use the -m flag followed by the octal mode to set permissions at the time of creation. For example, mkdir -m 754 foldername.
- Viewing permissions: You can verify the permissions of a folder using the ls -l command, as mentioned earlier. The permissions are displayed in the first column of the output.
- Default umask: The default permissions assigned to a new folder are influenced by the umask settings for your user. You can check the umask value by using the umask command, and you can modify the umask temporarily using umask XXX, where XXX is the octal value you want to set.
By following these steps and considering the additional details, you can create a folder with specific permissions in Linux efficiently.