Sobes.tech
Junior — Middle

What permissions are usually used when creating a new folder in an operating system?

sobes.tech AI

Answer from AI

In Unix-like operating systems, a new folder (directory) is usually created with default permissions of 755 (rwxr-xr-x). This means:

  • The owner has read, write, and execute permissions (rwx).
  • The group and other users have read and execute permissions (r-x), but not write.

These permissions allow the owner to modify the contents of the folder, while others can view and access it.

Example of creating a folder with these permissions:

mkdir new_folder
ls -ld new_folder
# drwxr-xr-x 2 user user 4096 date new_folder

In Windows, permissions are set differently, via ACLs, but by default, a folder is created with permissions that grant the owner full access, and others limited access.