Enjoy Slackware 15.0!
Diferencias
Muestra las diferencias entre dos versiones de la página.
Ambos lados, revisión anterior Revisión previa Próxima revisión | Revisión previa Última revisión Ambos lados, revisión siguiente | ||
es:slackbook:filesystem_permissions [2019/02/03 02:32 (UTC)] slackwarespanol [chmod, chown, y chgrp] |
es:slackbook:filesystem_permissions [2019/03/02 21:18 (UTC)] rramp [Resumen de permisos] |
||
---|---|---|---|
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 | | ||
- | Los permisos son bastante autoexplicativos, | + | Los permisos son bastante autoexplicativos, |
Línea 34: | Línea 32: | ||
- | Aquí vemos los permisos en mi directorio personal y su propiedad. El directorio es propiedad del usuario alan y los usuarios del grupo. Al usuario se le otorgan todos los derechos (rwx), al grupo solo se le otorgan permisos de lectura y ejecución (r-x), y todos los demás tienen prohibido hacer cualquier cosa. | + | Aquí vemos los permisos en mi directorio personal y su propiedad. El directorio es propiedad del usuario alan y el grupo users. Al usuario se le otorgan todos los derechos (rwx), al grupo solo se le otorgan permisos de lectura y ejecución (r-x), y todos los demás tienen prohibido hacer cualquier cosa. |
===== chmod, chown, y chgrp ===== | ===== chmod, chown, y chgrp ===== | ||
Línea 91: | Línea 89: | ||
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. | 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. | ||
- | Octal permissions derive their name from being assigned by one of eight | + | 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. |
- | digits, namely the numbers | + | |
- | number that is a power of 2, and those numbers are added together to | + | |
- | get the final permissions for one of the permission sets. If this | + | |
- | sounds confusing, maybe this table will help. | + | |
- | **Table 10.2. Octal Permissions** | + | ** Tabla 10.2. Permisos octales |
- | ^Permission ^Meaning| | + | ^ Permiso |
- | |Read |4| | + | |Lectura |4| |
- | |Write |2| | + | |Escritura |2| |
- | |Execute |1| | + | |Ejecución |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 123: | 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 165: | 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 200: | 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 | + | 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, |
- | 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). | + | |
- | a common | + | |
< | < | ||
Línea 228: | 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 256: | 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 267: | 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.--> |