[2024-feb-29] Sad news: Eric Layton aka Nocturnal Slacker aka vtel57 passed away on Feb 26th, shortly after hospitalization. He was one of our Wiki's most prominent admins. He will be missed.
Diferencias
Muestra las diferencias entre dos versiones de la página.
Ambos lados, revisión anteriorRevisión previaPróxima revisión | Revisión previaPróxima revisiónAmbos lados, revisión siguiente | ||
es:slackbook:filesystem_permissions [2019/02/03 01:36 (UTC)] – [Resumen de permisos] slackwarespanol | es:slackbook:filesystem_permissions [2019/02/27 03:18 (UTC)] – [SUID, SGID, y el Sticky Bit] antares_alf | ||
---|---|---|---|
Línea 1: | Línea 1: | ||
- | <note warning> | ||
- | <!-- Add your text below. We strongly advise to start with a Headline (see button bar above). --> | ||
====== Permisos del sistema de archivos ====== | ====== Permisos del sistema de archivos ====== | ||
Línea 23: | Línea 21: | ||
| Otros | r-x | Todos los demás pueden leer y ejecutar | | | Otros | r-x | Todos los demás pueden leer y ejecutar | | ||
- | The permissions are pretty self explanatory of course, at least for | + | Los permisos son bastante autoexplicativos, por supuesto, al menos para archivos. Leer, escribir y ejecutar le permite leer un archivo, escribir en él o ejecutarlo. Pero, ¿qué significan estos permisos para los directorios? En pocas palabras, los permisos de lectura otorgan la posibilidad de listar los contenidos del directorio |
- | files. Read, write, and execute allow you to read a file, write to it, | + | |
- | or execute it. But what do these permissions mean for directories? | + | |
- | Simply put, the read permissions grants the ability to list the | + | |
- | directory' | + | |
- | permission grants the ability to create new files in the directory as | + | |
- | well as delete the entire directory, even if you otherwise wouldn' | + | |
- | able to delete some of the other files inside it. The execute | + | |
- | permission grants the ability to actually enter the directory | + | |
- | **// | + | |
- | Let's look at the permissions on a directory now. | + | Echemos un vistazo |
< | < | ||
Línea 44: | Línea 32: | ||
- | Here we see the permissions on my home directory and its ownership. The | + | Aquí vemos los permisos en mi directorio personal y su propiedad. El directorio es propiedad del usuario |
- | directory is owned by the user alan and the group users. | + | ===== chmod, chown, |
- | granted all rights | + | |
- | permissions | + | |
- | ===== chmod, chown, | + | |
- | So now that we know what permissions are, how do we change them? And | + | Entonces, ahora que sabemos qué son los permisos, ¿cómo los cambiamos? Y para el caso, ¿cómo asignamos la propiedad del usuario y del grupo? La respuesta está aquí en esta sección. |
- | for that matter, how do we assign user and group ownership? The answer | + | |
- | is right here in this section. | + | |
- | The first tool we'll discuss is the useful | + | La primera herramienta que analizaremos es el comando útil ** // chown // ** (1). Utilizando |
- | **// | + | |
- | (1) command. Using **// | + | |
- | it), change the ownership of a file or | + | |
- | directory. **// | + | |
- | to change the user ownership, but can change the group ownership as well. | + | |
Línea 76: | Línea 54: | ||
- | By using a colon after the user account, you may also specify a new | + | Al usar dos puntos después de la cuenta de usuario, también puede especificar una nueva cuenta de grupo. |
- | group account. | + | |
Línea 89: | Línea 66: | ||
- | **// | + | ** // chown // ** también se puede usar recursivamente para cambiar la propiedad de todos los archivos y directorios debajo de un directorio de destino. El siguiente comando cambiaría todos los archivos bajo el directorio |
- | the ownership of all files and directories below a target directory. | + | |
- | The following command would change all the files under the directory | + | |
- | ''/ | + | |
< | < | ||
Línea 99: | Línea 72: | ||
- | Specifying a colon and a group name without a user name will simply | + | Especificar dos puntos y un nombre de grupo sin un nombre de usuario simplemente cambiará el grupo para un archivo y dejará intacta la propiedad del usuario. |
- | change the group for a file and leave the user ownership intact. | + | |
Línea 113: | Línea 85: | ||
- | The younger brother of **// | + | El hermano menor de ** // chown // ** es un poco menos útil ** // chgrp // ** (1). Este comando funciona igual que ** // chown // **, excepto que solo puede cambiar la propiedad del grupo de un archivo. Como ** // chown // ** ya puede hacer esto, ¿por qué molestarse con ** // chgrp // **? La respuesta es simple. |
- | slightly less useful | + | |
- | command works just like **// | + | |
- | it can only change the group | + | |
- | ownership of a file. Since **// | + | |
- | already do this, why bother with | + | |
- | **// | + | |
- | operating systems use a | + | |
- | different version of **// | + | |
- | change the group ownership, so | + | |
- | if you ever come across one of those, now you know how. | + | |
+ | Hay una razón por la que discutimos el cambio de propiedad antes de cambiar los permisos. El primero es un concepto mucho más fácil de entender. La herramienta para cambiar permisos en un archivo o directorio es ** // chmod // ** (1). La sintaxis es casi idéntica a la de ** // chown // **, pero en lugar de especificar un usuario o grupo, el administrador debe especificar un conjunto de permisos octales o un conjunto de permisos alfabéticos. Ninguno de los dos es especialmente fácil de entender la primera vez. Comenzaremos con los permisos octales menos complicados. | ||
- | There' | + | Los permisos octales derivan que su nombre se asigna por uno de ocho dígitos, a saber, los números del 0 al 7. A cada permiso se le asigna un número que es una potencia de 2, y esos números se suman para obtener los permisos finales para uno de los conjuntos de permisos. Si esto suena confuso, tal vez esta tabla ayude. |
- | permissions. The first is a much easier concept to grasp. The tool for | + | |
- | changing permissions on a file or directory is | + | |
- | **// | + | |
- | is nearly identical to that for **// | + | |
- | rather than | + | |
- | specify | + | |
- | octal permissions or a set of alphabetic permissions. Neither one is | + | |
- | especially easy to grasp the first time. We'll begin with the less | + | |
- | complicated octal permissions. | + | |
- | Octal permissions derive their name from being assigned by one of eight | + | ** Tabla 10.2. Permisos octales |
- | digits, namely the numbers 0 through 7. Each permissions is assigned a | + | ^ Permiso |
- | number that is a power of 2, and those numbers are added together to | + | |Lectura |4| |
- | get the final permissions for one of the permission sets. If this | + | |Escritura |2| |
- | sounds confusing, maybe this table will help. | + | |Ejecución |1| |
- | + | ||
- | + | ||
- | **Table 10.2. Octal Permissions** | + | |
- | ^Permission ^Meaning| | + | |
- | |Read |4| | + | |
- | |Write |2| | + | |
- | |Execute |1| | + | |
- | + | ||
- | By adding these values together, we can reach any number between 0 and | + | |
- | 7 and specify all possible permission combinations. For example, to | + | |
- | grant both read and write privileges while denying execute, we would | + | |
- | use the number 6. The number 3 would grant write and execute | + | |
- | permissions, | + | |
- | number for each of the three sets when using octal permissions. It's | + | |
- | not possible to specify only a set of user or group permissions this | + | |
- | way for example. | + | |
+ | Al sumar estos valores, podemos alcanzar cualquier número entre 0 y 7 y especificar todas las combinaciones de permisos posibles. Por ejemplo, para otorgar privilegios de lectura y escritura mientras se deniega la ejecución, usaríamos el número 6. El número 3 otorgaría permisos de escritura y ejecución, pero negaría la capacidad de leer el archivo. Debemos especificar un número para cada uno de los tres conjuntos cuando se utilizan permisos octales. Por ejemplo, no es posible especificar solo un conjunto de permisos de usuario o grupo. | ||
< | < | ||
Línea 170: | Línea 109: | ||
- | **// | + | ** // chmod // ** también puede usar valores de letras junto con <key>''+''</ |
- | < | + | |
- | While this may be easier to | + | |
- | remember, it's often easier to use the octal permissions. | + | |
+ | ** Tabla 10.3. Permisos alfabéticos ** | ||
+ | ^ Permiso ^ Valor de la letra | | ||
+ | | Leer | r | | ||
+ | | Escribir | w | | ||
+ | | Ejecutar | x | | ||
- | **Table 10.3. Alphabetic Permissions** | + | ** Tabla 10.4. Usuarios y grupos alfabéticos |
- | ^Permission ^Letter Value| | + | ^ Cuentas afectadas |
- | |Read |r| | + | | Usuario |
- | |Write |w| | + | | Grupo | g | |
- | |Execute |x| | + | | Otros / Mundo | o | |
- | + | Para usar los valores de las letras con **// | |
- | **Table | + | |
- | ^Accounts Affected ^Letter Value| | + | |
- | |User/Owner |u| | + | |
- | |Group |g| | + | |
- | |Others/World |o| | + | |
- | + | ||
- | To use the letter values with **// | + | |
- | must specify which set to use them with, either | + | |
- | group, and //" | + | |
- | adding or removing permissions with the //" | + | |
- | sets can be changed at once by separating each with a comma. | + | |
Línea 212: | Línea 142: | ||
-r-xr----- 1 alan users 0 2008-06-06 23:37 d* | -r-xr----- 1 alan users 0 2008-06-06 23:37 d* | ||
</ | </ | ||
+ | Lo que prefieras usar depende completamente de ti. Hay lugares donde uno es mejor que el otro, por lo que un verdadero Slacker lo sabrá de adentro hacia afuera. | ||
+ | ===== SUID, SGID, y el " | ||
+ | Todavía no hemos terminado con los permisos. Hay otros tres // permisos " | ||
- | Which you prefer to use is entirely up to you. There are places where | + | SUID y SGID representan |
- | one is better than the other, so a real Slacker will know both inside | + | |
- | out. | + | |
- | ===== SUID, SGID, and the " | + | |
- | + | ||
- | We're not quite done with permissions just yet. There are three other | + | |
- | //"special"// | + | |
- | SUID, SGID, and the sticky bit. When a file has one or more of these | + | |
- | permissions set, it behaves in special ways. The SUID and SGID | + | |
- | permissions change the way an application is run, while the sticky bit | + | |
- | restricts deletion of files. These permissions are applied with | + | |
- | **// | + | |
- | like read, write, and execute, but with a twist. | + | |
- | + | ||
- | + | ||
- | SUID and SGID stand for //"Set User ID"// | + | |
- | When an application with one of these bits is set, the application runs | + | |
- | with the user or group ownership permissions of that application | + | |
- | regardless of what user actually | + | |
- | executed it. Let's take a look at a common | + | |
- | **// | + | |
Línea 247: | Línea 160: | ||
- | Notice the permissions on **// | + | Observe los permisos en **// |
- | an < | + | |
- | < | + | |
- | **// | + | |
- | it, the process will run as the user //" | + | |
- | that actually executed it. The reason for this is readily apparent as | + | |
- | soon as you look at the two files it modifies. Neither | + | |
- | ''/ | + | |
- | are writable by anyone other than root. Since users need to change | + | |
- | their personal | + | |
- | run as root in order to modify those files. | + | |
- | So what about the sticky bit? The sticky bit restricts the ability to | ||
- | move or delete files and is only ever set on directories. Non-root | ||
- | users cannot move or delete any files under a directory with the sticky | ||
- | bit set unless they are the owner of that file. Normally anyone with | ||
- | write permission to the file can do this, but the sticky bit prevents | ||
- | it for anyone but the owner (and of course, root). Let's take a look at | ||
- | a common //" | ||
+ | Entonces, ¿qué pasa con el sticky bit? El sticky bit restringe la capacidad de mover o eliminar archivos y solo se establece en directorios. Los usuarios que no son root no pueden mover o eliminar ningún archivo de un directorio con el conjunto de sticky bit a menos que sean los propietarios de ese archivo. Normalmente, | ||
< | < | ||
Línea 275: | Línea 171: | ||
- | Naturally, being a directory for the storage of temporary files system | + | Naturalmente, al ser un directorio para el almacenamiento de archivos temporales en todo el sistema, ''/ |
- | wide, ''/ | + | |
- | executable by anyone and everyone. Since any user is likely to have a | + | |
- | file or two stored here at any time, it only makes good sense to | + | |
- | prevent other users from deleting those files, so the sticky bit has | + | |
- | been set. You can see it by the presence of the < | + | |
- | place of the < | + | |
- | + | ** Tabla 10.5. Permisos | |
- | **Table 10.5. SUID, SGID, and "Sticky" | + | ^ Tipo de permiso |
- | ^Permission Type ^Octal Value ^Letter Value| | + | |
|SUID |4 |s| | |SUID |4 |s| | ||
|SGID |2 |s| | |SGID |2 |s| | ||
|Sticky |1 |t| | |Sticky |1 |t| | ||
- | When using octal permissions, you must specify an additional leading | + | Al utilizar permisos octales, debe especificar un valor octal inicial adicional. Por ejemplo, para recrear el permiso en ''/ |
- | octal value. For example, to recreate the permission on | + | |
- | ''/ | + | |
- | permissions on ''/ | + | |
- | Essentially, any time this leading fourth octet isn't specified, | + | |
- | **// | + | |
Línea 303: | Línea 187: | ||
</ | </ | ||
- | + | El uso de los valores de permiso alfabético es ligeramente diferente. Asumiendo que los dos archivos anteriores tienen permisos de 0000 (sin permisos), aquí es cómo los estableceríamos. | |
- | Using the alphabetic permission values is slightly different. Assuming | + | |
- | the two files above have permissions of 0000 (no permissions at all), | + | |
- | here is how we would set them. | + | |
Línea 314: | Línea 195: | ||
</ | </ | ||
- | ====== Chapter Navigation | + | ===== Navegación de capítulos |
- | **Previous Chapter: [[slackbook: | + | **Capítulo anterior: [[:es:slackbook: |
- | **Next Chapter: [[slackbook: | + | **Capítulo siguiente: [[:es:slackbook: |
- | ====== | + | ====== |
<!-- If you copy information from another source, then specify that source --> | <!-- If you copy information from another source, then specify that source --> | ||
- | * Original source: [[http:// | + | * Fuente original: [[http:// |
<!-- Authors are allowed to give credit to themselves! --> | <!-- Authors are allowed to give credit to themselves! --> | ||
- | * Originally written by Alan Hicks, Chris Lumens, David Cantrell, Logan Johnson | + | * Escrito originalmente por Alan Hicks, Chris Lumens, David Cantrell, Logan Johnson |
- | <!-- * Contributions | + | * Traducción por: [[wiki: |
+ | <!-- * Contrbutions | ||
<!-- Please do not modify anything below, except adding new tags.--> | <!-- Please do not modify anything below, except adding new tags.--> |