1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129
|
.\" Hey Emacs! This file is -*- nroff -*- source.
.\"
.\" Copyright (c) 1992 Drew Eckhardt (drew@cs.colorado.edu), March 28, 1992
.\"
.\" Permission is granted to make and distribute verbatim copies of this
.\" manual provided the copyright notice and this permission notice are
.\" preserved on all copies.
.\"
.\" Permission is granted to copy and distribute modified versions of this
.\" manual under the conditions for verbatim copying, provided that the
.\" entire resulting derived work is distributed under the terms of a
.\" permission notice identical to this one
.\"
.\" Since the Linux kernel and libraries are constantly changing, this
.\" manual page may be incorrect or out-of-date. The author(s) assume no
.\" responsibility for errors or omissions, or for damages resulting from
.\" the use of the information contained herein. The author(s) may not
.\" have taken the same level of care in the production of this manual,
.\" which is licensed free of charge, as they might when working
.\" professionally.
.\"
.\" Formatted or processed versions of this manual, if unaccompanied by
.\" the source, must acknowledge the copyright and authors of this work.
.\"
.\" Modified by Michael Haardt (u31b3hs@pool.informatik.rwth-aachen.de)
.\" Modified Wed Jul 21 21:53:01 1993 by Rik Faith (faith@cs.unc.edu)
.\" Translated 18 Dec 1995 Miguel A. Sepulveda (miguel@typhoon.harvard.edu)
.\" Modified 1 Jul 1996 Miguel A. Sepulveda (angel@vivaldi.princeton.edu)
.TH CHOWN "1 Julio 1996" "Linux 0.99.11" "Manual del Programador Linux"
.SH NOMBRE
chown, fchown \- cambia el propietario de un fichero
.SH SINOPSIS
.B #include <sys/types.h>
.br
.B #include <unistd.h>
.sp
.BI "int chown(const char *" path ", uid_t " owner ", gid_t " group );
.br
.BI "int fchown(int " fd ", uid_t " owner ", gid_t " group );
.SH DESCRIPCIN
Cambia el propietario del fichero especificado por
.I path
.I fd
Solamente el superusuario puede cambiar el propietario de un fichero.
El propietario de un fichero puede cambiar el grupo de dicho fichero a
cualquier grupo al que dicho usuario es miembro. El superusuario
puede cambiar el grupo arbitrariamente.
Si a
.I owner
.I group
se asigna \-1, entonces dicho ID-es no se alteran.
.SH "VALOR REGRESADO"
En caso de xito, cero regresa. Si se encuentra algn error \-1, y
.I errno
es asignado apropiadamente.
.SH ERRORES
Dependiendo del sistema de ficheros, otros errores pueden generarse.
Los errores ms generales para
.B chown
son:
.TP 1.0i
.B EPERM
El UID efectivo no coincide con el propietario del fichero, y no es cero:
el propietario
.I (owner)
o grupo
.I (group)
han sido especificados incorrectamente.
.TP
.B EROFS
El fichero en cuestin reside en una zona de solo-lectura del sistema
de ficheros.
.TP
.B EFAULT
.I path
seala fuera de su espacio de direcciones accesible.
.TP
.B ENAMETOOLONG
.I path
es demasiado largo.
.TP
.B ENOENT
El fichero no existe.
.TP
.B ENOMEM
No hubo suficiente memoria accesible en el kernel.
.TP
.B ENOTDIR
Un componente del prefijo
.I path
no es un directorio.
.TP
.B EACCES
Permiso de busqueda denegado en un componente del camino (path).
.TP
.B ELOOP
.I path
contiene una referencia circular (por ejemplo, una ligadura simblica a si
misma).
.PP
Los errores comunes para
.B fchown
se listan a continuacin:
.TP 1.0i
.B EBADF
El descriptor no es vlido.
.TP
.B ENOENT
Lea nota anterior.
.TP
.B EPERM
Lea nota anterior.
.TP
.B EROFS
Lea nota anterior.
.SH NOTAS
El prototipo para
.B fchown
slo est disponible si
.B __USE_BSD
est definido.
.SH "VASE TAMBIN"
.BR chmod "(2), " flock "(2)"
|