Documentation for a newer release is available. View Latest

Servidores de Ficheros e Impresión

Este capitulo le guía a través de la instalación y configuración de Samba, una implementación de código abierto de los protocolos Server Message Block (SMB) y sistemas de archivos común de Internet (CIFS) y de vsftpd, el servidor FTP principal enviado con Fedora. Adicionalmente, explica como usar la herramienta Printer para configurar impresoras.

Samba

Documentation for configuring and using Samba has been removed due to being outdated. Use Red Hat Enterprise Linux 9 Samba documentation instead.

FTP

Protocolo de Transferencia de Ficheros (FTP) es uno de los protocolos más antiguos y más usados en Internet hoy. Su propósito es transferir con seguridad ficheros entre ordenadores de una red sin requerir que el usuario acceda directamente al host remoto o sin que se tenga que tener conocimiento de como usar el sistema remoto. Permite a los usuarios acceder a ficheros en los sistemas remotos usando un conjunto estándar de sencillos comandos.

Esta sección describe los conceptos básicos del protocolo FTP, así como las opciones de configuración para el servidor primario `FTP`enviado con Fedora, vsftpd.

El Protocolo de Transferencia de Ficheros

Sin embargo, puesto que FTP es tan frecuente en Internet, a menudo se requiere compartir ficheros con el público. Los administradores de sistema, por lo tanto, deben conocer las características únicas del protocolo FTP.

Varios puertos, varias modalidades

A diferencia de la mayoría de protocolos que se emplean en Internet, FTP requiere la utilización de varios puertos de red para funcionar adecuadamente. Cuando una aplicación cliente de FTP inicia una conexión a un servidor FTP, abre el puerto 21 en este, el conocido como puerto de comandos. Este puerto sirve para emitir todas los comandos que van hacia el servidor. Cualquier dato solicitado desde el servidor se devuelve al cliente a través de un puerto de datos. El número de puerto para las conexiones de datos, así como la manera en que se inician las conexiones de datos, varían en función del modo en que el cliente solicita los datos: activa o pasivamente.

A continuación se definen estos modos:

modo activo

El modo activo es el método original utilizado por el protocolo FTP para transferir datos a la aplicación cliente. Cuando el cliente FTP inicia una transferencia de datos en modo activo, el servidor abre una conexión desde su puerto 20 hacia la dirección IP y un puerto no privilegiado al azar (mayor que 1024) especificado por el cliente. Este mecanismo implica que a la máquina cliente debe permitírsele aceptar conexiones en cualquier puerto superior a 1024. Con el auge de las redes no seguras como Internet, ahora es extendida la utilización de cortafuegos para proteger las máquinas cliente. Como estos cortafuegos de lado cliente a menudo rechazan las conexiones entrantes provenientes de servidores FTP en modo activo, se ideó el modo pasivo.

modo pasivo

El modo pasivo, como el activo, lo inicia la aplicación cliente de FTP. Al solicitar datos del servidor, el cliente FTP indica que quiere acceder a los datos en modo pasivo y el servidor brinda la dirección IP y un puerto no privilegiado al azar (mayor que 1024) en el servidor. El cliente se conecta en ese puerto del servidor para descargar la información solicitada.

Aunque el modo pasivo da solución a diversos problemas de interferencia por cortafuegos en el lado cliente con conexiones de datos, puede complicar la administración del cortafuegos de lado servidor. Puede disminuir la cantidad de puertos abiertos de un servidor si limita el intervalo de puertos no privilegiados del servidor FTP. Esto a su vez simplifica el proceso de configuración de reglas para el cortafuegos del servidor. Consulte Opciones de red para obtener más información sobre limitar los puertos pasivos.

Servidores FTP

Fedora incluye dos servidores FTP diferentes:

  • proftpd: un servidor FTP rápido, estable y altamente configurable.

  • vsftpd: Un demonio FTP rápido y seguro, que es la opción preferida de servidor FTP para Fedora. El resto de esta sección se dedica a describir vsftpd.

vsftpd

El Demonio FTP Muy Seguro (vsftpd) esta diseñado desde cero para ser rápido, estable y, lo más importante, seguro. vsftpd es el único servidor FTP independiente distribuido con Fedora, debido a su capacidad para manejar un gran número de conexiones de manera eficiente y segura.

El modelo de seguridad usado por vsftpd tiene tres aspecto principales:

  • Fuerte separación de procesos privilegiados y no privilegiados — Los procesos separados manejan diferentes tareas y cada uno de los procesos se ejecuta con los privilegios mínimos requeridos por la tarea.

  • Las tareas que requieren privilegios elevados con manejadas por procesos con los mínimos privilegios necesarios — Aprovechando las compatibilidades encontradas en la librería libcap, las tareas que normalmente necesitan privilegios completos de root pueden ser ejecutadas con mayor seguridad desde procesos con menos privilegios.

  • La mayoría de los procesos se ejecutan en una jaula chroot — Siempre que sea posible los procesos cambian de raíz al directorio que se comparte; este directorio es considerado entonces una jaula chroot. Por ejemplo, si el directorio /var/ftp/ es el directorio compartido primario, vsftpd reasigna /var/ftp/ al nuevo directorio raíz, conocido como /. Esto deshabilita cualquier potencial actividad maliciosa de un hacker en cualquier directorio que no esté contenido bajo el nuevo directorio raíz.

El uso de esta prácticas de seguridad tienen el siguiente efecto sobre como vsftpd trata con las peticiones:

  • El proceso padre corre con los mínimos privilegios requeridos — El proceso padre calcula dinámicamente el nivel de privilegios que se requiere para minimizar el nivel de riesgo. Los procesos hijos manejan la interacción directa con los clientes FTP y se ejecutan casi sin privilegios si es posible.

  • Todas las operaciones que requieran privilegios elevados son manejadas por pequeños procesos padre — Al igual que el Servidor HTTP Apache, vsftpd lanza procesos hijo sin privilegios para manejar las conexiones entrantes. Estos permite que los procesos padre con privilegios sean tan pequeños como sea posible para manejar relativamente pocas tareas.

  • Todas las peticiones desde procesos hijo sin privilegios son distribuidas por los procesos padre — Las comunicaciones con los procesos hijos son recibidas por un socket y se comprueba la validez de cualquier información de los procesos hijo antes de actuar.

  • La mayoría de la interacción con los clientes FTP es manejada por procesos hijo sin privilegios en una jaula chroot — Como estos procesos hijo no tienen privilegios y solo tiene acceso al directorio que está siendo compartido, cualquier proceso que falle solo permite al atacante el acceso a los ficheros compartidos.

Ficheros instalados con vsftpd

El RPM vsftpd instala el demonio (/usr/sbin/vsftpd), su configuración y ficheros relacionados así como los directorios FTP sobre el sistema. A continuación se listan los ficheros y directorios relacionados con la configuración de vsftpd:

  • /etc/rc.d/init.d/vsftpd — El script de inicializacion (initscript) usado por el comando systemctl para arrancar, parar y reiniciar vsftpd. Vea Arrancando y Parando vsftpd para mas información sobre el uso de este script.

  • /etc/pam.d/vsftpd — El fichero de configuración de los Módulos de Autenticación Conectables (PAM) para vsftpd. Este fichero especifica los requisitos que un usuario debe tener para acceder al servidor FTP. Para más información sobre PAM, vea la guía Using Pluggable Authentication Modules (PAM) chapter of the Fedora 38 [citetitle]_Managing Single Sign-On and Smart Cards.

  • /etc/vsftpd/vsftpd.conf — El archivo de configuración para vsftpd. Vea en vsftpd Opciones de Configuración una lista de importantes opciones contenidas en este archivo.

  • /etc/vsftpd/ftpusers — Una lista de los usuarios a los que no está permitido acceder a vsftpd. De forma predeterminada, esta lista incluye los usuarios root, bin y daemon, entre otros.

  • /etc/vsftpd/user_list — Este archivo puede ser configurado para denegar o permitir el acceso a los usuarios listados, dependiendo de si la directiva userlist_deny esta establecida en YES (predeterminado) o NO en /etc/vsftpd/vsftpd.conf. Si se usa /etc/vsftpd/user_list para conceder acceso a usuarios, los nombres de usuarios listados no deben aparecer en /etc/vsftpd/ftpusers.

  • /var/ftp/ — El directorio que contiene los archivos servidos por vsftpd. También contiene el directorio /var/ftp/pub/ para los usuarios anónimos. Ambos directorios deben ser legibles por todo el mundo, pero solo editables por el usuario root.

Arrancando y Parando vsftpd

El RPM vsftpd instala el script /etc/rc.d/init.d/vsftpd al que se puede acceder usando el comando systemctl.

Para arrancar el servidor, como root teclee:

systemctl start vsftpd.service

Para parar el servidor, como root teclee:

systemctl stop vsftpd.service

La opción restart es un atajo para parar y después arrancar vsftpd. Esta es la forma más eficiente de hacer que los cambios de configuración tomen efecto después de editar el archivo de configuración de vsftpd.

Para reiniciar el servidor, como root teclee:

systemctl restart vsftpd.service

La opción condrestart (reinicio condicional) arranca vsftpd solo si está corriendo en este momento. Esta opción es útil para scripts, puesto que no arranca el demonio si no está corriendo.

Para reiniciar condicionalmente el servidor, como root teclee:

systemctl condrestart vsftpd.service

Por defecto, el servicio vsftpd no se inicia automáticamente en el momento del arranque. Para configurar que el servicio vsftpd se inicie en el momento del arranque, utilice un administrador de servicios como systemctl. Vea en Servicios y Demonios más información sobre cómo configurar servicios en Fedora.

Configurar el Cortafuegos para FTP

De forma predeterminada, firewalld bloquea las conexiones FTP entrantes. Para permitir conexiones FTP, teclee como root:

firewall-cmd --add-service=ftp

El cambio será aplicado inmediatamente, pero se perderá la próxima vez que se recargue firewalld o que se reinicie el sistema. Para hacerlo permanente, teclee:

firewall-cmd --permanent --add-service=ftp

Para más información sobre la configuración de firewalld, vea la Guía de Seguridad de Red Hat Enterprise Linux 7.

Iniciar múltiples copias de vsftpd

Algunas veces un ordenador se utiliza para servir múltiples dominios FTP. Esta es una técnica llamada multiacogimiento. Una manera de hacerlo usando vsftpd es corriendo múltiples copias del demonio, cada una con su propio archivo de configuración.

Para hacer esto, primero asigne todas las direcciones IP relevantes a dispositivos de red o alias de dispositivo de red en el sistema. Para más información sobre la configuración de los dispositivos de red, los alias de dispositivos e información adicional sobre los scripts de configuración de red vea la Guía de Red Fedora.

A continuación, se debe configurar el servidor DNS para los dominios FTP para referirlos a la maquina correcta. Para información sobre BIND y sus archivos de configuración vea la [citetitle]_Guía de Red Fedora.

Si hay mas archivos de configuración presentes en el directorio /etc/vsftpd, llamando a systemctl start vsftpd.service consigue que el initscript de /etc/rc.d/init.d/vsftpd inicie el mismo número de procesos que archivos de configuración. Cada archivo de configuración debe tener un nombre único en el directorio /etc/vsftpd/ y debe ser de escritura y de lectura solo para root.

Opciones de Configuración de vsftpd

Aunque vsftpd puede no ofrecer el nivel de personalización que otros servidores FTP ampliamente disponibles tienen, ofrece bastantes opciones que llenan las necesidades de la mayoría de los administradores. El hecho de que no esté demasiado cargado de funciones limita la configuración y los errores de programación.

Toda la configuración de vsftpd se maneja por su archivo de configuración , /etc/vsftpd/vsftpd.conf. Cada directiva tiene su propia línea dentro del archivo y sigue el siguiente formato:

directive=value

Para cada directiva, reemplace directive con una directiva válida y value con un valor válido.

No utilice espacios

No debe haber ningún espacio entre la directive, el símbolo igual y el value en una directiva.

Las líneas de comentarios deben empezar con el signo almohadilla (#) y son ignoradas por el demonio.

Para una lista completa de todas las directivas disponibles, vea la página de manual vsftpd.conf.

Asegurar el servicio vsftpd

Vea una visión general de las maneras de asegurar vsftpd en Guía de Seguridad Red Hat Enterprise Linux 7.

La siguiente es una lista de algunas de las directivas más importantes incluidas en /etc/vsftpd/vsftpd.conf. Cualesquier directivas que no se encuentren explícitamente en el archivo de configuración de vsftpd se establecen a su valor predeterminado.

Opciones del Demonio

Lo siguiente es una lista de directivas que controlan el comportamiento total del demonio vsftpd.

  • listen — When enabled, vsftpd runs in stand-alone mode. Fedora sets this value to YES. This directive cannot be used in conjunction with the listen_ipv6 directive.

    El valor predeterminado es NO.

  • listen_ipv6 — When enabled, vsftpd runs in stand-alone mode, but listens only to IPv6 sockets. This directive cannot be used in conjunction with the listen directive.

    El valor predeterminado es NO.

  • session_support — When enabled, vsftpd attempts to maintain login sessions for each user through Pluggable Authentication Modules (PAM). For more information, refer to the Using Pluggable Authentication Modules (PAM) chapter of the Red Hat Enterprise Linux 6 Managing Single Sign-On and Smart Cards and the PAM man pages. . If session logging is not necessary, disabling this option allows vsftpd to run with less processes and lower privileges.

    El valor predeterminado es YES.

Log In Options and Access Controls

The following is a list of directives which control the login behavior and access control mechanisms.

  • anonymous_enable — When enabled, anonymous users are allowed to log in. The usernames anonymous and ftp are accepted.

    El valor predeterminado es YES.

    See Anonymous User Options for a list of directives affecting anonymous users.

  • banned_email_file — If the deny_email_enable directive is set to YES, this directive specifies the file containing a list of anonymous email passwords which are not permitted access to the server.

    El valor predeterminado es /etc/vsftpd/banned_emails.

  • banner_file — Specifies the file containing text displayed when a connection is established to the server. This option overrides any text specified in the ftpd_banner directive.

    No hay ningún valor predeterminado para esta directiva.

  • cmds_allowed — Specifies a comma-delimited list of FTP commands allowed by the server. All other commands are rejected.

    No hay ningún valor predeterminado para esta directiva.

  • deny_email_enable — When enabled, any anonymous user utilizing email passwords specified in the /etc/vsftpd/banned_emails are denied access to the server. The name of the file referenced by this directive can be specified using the banned_email_file directive.

    El valor predeterminado es NO.

  • ftpd_banner — When enabled, the string specified within this directive is displayed when a connection is established to the server. This option can be overridden by the banner_file directive.

    By default vsftpd displays its standard banner.

  • local_enable — When enabled, local users are allowed to log into the system.

    El valor predeterminado es YES.

    See Local User Options for a list of directives affecting local users.

  • pam_service_name — Specifies the PAM service name for vsftpd.

    El valor predeterminado es ftp. Observe que, en Fedora, el valor se establece a vsftpd.

  • El valor predeterminado es NO. Observe que, en Fedora, el valor se establece a YES.

  • userlist_deny — When used in conjunction with the userlist_enable directive and set to NO, all local users are denied access unless the username is listed in the file specified by the userlist_file directive. Because access is denied before the client is asked for a password, setting this directive to NO prevents local users from submitting unencrypted passwords over the network.

    El valor predeterminado es YES.

  • userlist_enable — When enabled, the users listed in the file specified by the userlist_file directive are denied access. Because access is denied before the client is asked for a password, users are prevented from submitting unencrypted passwords over the network.

    El valor predeterminado es NO; sin embargo, en Fedora el valor se establece a YES.

  • userlist_file — Specifies the file referenced by vsftpd when the userlist_enable directive is enabled.

    El valor predeterminado es /etc/vsftpd/user_list y se crea durante la instalación.

Anonymous User Options

The following lists directives which control anonymous user access to the server. To use these options, the anonymous_enable directive must be set to YES.

  • anon_mkdir_write_enable — When enabled in conjunction with the write_enable directive, anonymous users are allowed to create new directories within a parent directory which has write permissions.

    El valor predeterminado es NO.

  • anon_root — Specifies the directory vsftpd changes to after an anonymous user logs in.

    No hay ningún valor predeterminado para esta directiva.

  • anon_upload_enable — When enabled in conjunction with the write_enable directive, anonymous users are allowed to upload files within a parent directory which has write permissions.

    El valor predeterminado es NO.

  • anon_world_readable_only — When enabled, anonymous users are only allowed to download world-readable files.

    El valor predeterminado es YES.

  • ftp_username — Specifies the local user account (listed in /etc/passwd) used for the anonymous FTP user. The home directory specified in /etc/passwd for the user is the root directory of the anonymous FTP user.

    El valor predeterminado es ftp.

  • no_anon_password — When enabled, the anonymous user is not asked for a password.

    El valor predeterminado es NO.

  • secure_email_list_enable — When enabled, only a specified list of email passwords for anonymous logins are accepted. This is a convenient way to offer limited security to public content without the need for virtual users.

    Anonymous logins are prevented unless the password provided is listed in /etc/vsftpd/email_passwords. The file format is one password per line, with no trailing white spaces.

    El valor predeterminado es NO.

Local User Options

The following lists directives which characterize the way local users access the server. To use these options, the local_enable directive must be set to YES.

  • chmod_enable — When enabled, the FTP command SITE CHMOD is allowed for local users. This command allows the users to change the permissions on files.

    El valor predeterminado es YES.

  • chroot_list_enable — When enabled, the local users listed in the file specified in the chroot_list_file directive are placed in a chroot jail upon log in.

    If enabled in conjunction with the chroot_local_user directive, the local users listed in the file specified in the chroot_list_file directive are not placed in a chroot jail upon log in.

    El valor predeterminado es NO.

  • chroot_list_file — Specifies the file containing a list of local users referenced when the chroot_list_enable directive is set to YES.

    El valor predeterminado es /etc/vsftpd/chroot_list.

  • chroot_local_user — When enabled, local users are change-rooted to their home directories after logging in.

    El valor predeterminado es NO.

    Avoid enabling the chroot_local_user option

    Enabling chroot_local_user opens up a number of security issues, especially for users with upload privileges. For this reason, it is not recommended.

  • guest_enable — When enabled, all non-anonymous users are logged in as the user guest, which is the local user specified in the guest_username directive.

    El valor predeterminado es NO.

  • guest_username — Specifies the username the guest user is mapped to.

    El valor predeterminado es ftp.

  • local_root — Specifies the directory vsftpd changes to after a local user logs in.

    No hay ningún valor predeterminado para esta directiva.

  • local_umask — Specifies the umask value for file creation. Note that the default value is in octal form (a numerical system with a base of eight), which includes a “0” prefix. Otherwise the value is treated as a base-10 integer.

    El valor predeterminado es 022.

  • passwd_chroot_enable — When enabled in conjunction with the chroot_local_user directive, vsftpd change-roots local users based on the occurrence of the /./ in the home directory field within /etc/passwd.

    El valor predeterminado es NO.

  • user_config_dir — Specifies the path to a directory containing configuration files bearing the name of local system users that contain specific setting for that user. Any directive in the user’s configuration file overrides those found in /etc/vsftpd/vsftpd.conf.

    No hay ningún valor predeterminado para esta directiva.

Directory Options

The following lists directives which affect directories.

  • dirlist_enable — When enabled, users are allowed to view directory lists.

    El valor predeterminado es YES.

  • dirmessage_enable — When enabled, a message is displayed whenever a user enters a directory with a message file. This message resides within the current directory. The name of this file is specified in the message_file directive and is .message by default.

    El valor predeterminado es NO. Observe que, en Fedora, el valor se establece a YES.

  • force_dot_files — When enabled, files beginning with a dot (.) are listed in directory listings, with the exception of the . and .. files.

    El valor predeterminado es NO.

  • hide_ids — When enabled, all directory listings show ftp as the user and group for each file.

    El valor predeterminado es NO.

  • message_file — Specifies the name of the message file when using the dirmessage_enable directive.

    El valor predeterminado es .message.

  • text_userdb_names — When enabled, text usernames and group names are used in place of UID and GID entries. Enabling this option may slow performance of the server.

    El valor predeterminado es NO.

  • use_localtime — When enabled, directory listings reveal the local time for the computer instead of GMT.

    El valor predeterminado es NO.

Opciones de transferencia de archivos

The following lists directives which affect directories.

  • download_enable — When enabled, file downloads are permitted.

    El valor predeterminado es YES.

  • chown_uploads — When enabled, all files uploaded by anonymous users are owned by the user specified in the chown_username directive.

    El valor predeterminado es NO.

  • chown_username — Specifies the ownership of anonymously uploaded files if the chown_uploads directive is enabled.

    El valor predeterminado es root.

  • write_enable — When enabled, FTP commands which can change the file system are allowed, such as DELE, RNFR, and STOR.

    El valor predeterminado es YES.

Opciones de registro

The following lists directives which affect vsftpd's logging behavior.

  • dual_log_enable — When enabled in conjunction with xferlog_enable, vsftpd writes two files simultaneously: a wu-ftpd-compatible log to the file specified in the xferlog_file directive (/var/log/xferlog by default) and a standard vsftpd log file specified in the vsftpd_log_file directive (/var/log/vsftpd.log by default).

    El valor predeterminado es NO.

  • log_ftp_protocol — When enabled in conjunction with xferlog_enable and with xferlog_std_format set to NO, all FTP commands and responses are logged. This directive is useful for debugging.

    El valor predeterminado es NO.

  • syslog_enable — When enabled in conjunction with xferlog_enable, all logging normally written to the standard vsftpd log file specified in the vsftpd_log_file directive (/var/log/vsftpd.log by default) is sent to the system logger instead under the FTPD facility.

    El valor predeterminado es NO.

  • vsftpd_log_file — Specifies the vsftpd log file. For this file to be used, xferlog_enable must be enabled and xferlog_std_format must either be set to NO or, if xferlog_std_format is set to YES, dual_log_enable must be enabled. It is important to note that if syslog_enable is set to YES, the system log is used instead of the file specified in this directive.

    El valor predeterminado es /var/log/vsftpd.log.

  • xferlog_enable — When enabled, vsftpd logs connections (vsftpd format only) and file transfer information to the log file specified in the vsftpd_log_file directive (/var/log/vsftpd.log by default). If xferlog_std_format is set to YES, file transfer information is logged but connections are not, and the log file specified in xferlog_file (/var/log/xferlog by default) is used instead. It is important to note that both log files and log formats are used if dual_log_enable is set to YES.

    El valor predeterminado es NO. Observe que, en Fedora, el valor se establece a YES.

  • xferlog_file — Specifies the wu-ftpd-compatible log file. For this file to be used, xferlog_enable must be enabled and xferlog_std_format must be set to YES. It is also used if dual_log_enable is set to YES.

    El valor predeterminado es /var/log/xferlog.

  • xferlog_std_format — When enabled in conjunction with xferlog_enable, only a wu-ftpd-compatible file transfer log is written to the file specified in the xferlog_file directive (/var/log/xferlog by default). It is important to note that this file only logs file transfers and does not log connections to the server.

    El valor predeterminado es NO. Observe que, en Fedora, el valor se establece a YES.

Mantener la compatibilidad con formatos de archivo de registro anteriores

To maintain compatibility with log files written by the older wu-ftpd FTP server, the xferlog_std_format directive is set to YES under Fedora. However, this setting means that connections to the server are not logged.

To both log connections in vsftpd format and maintain a wu-ftpd-compatible file transfer log, set dual_log_enable to YES.

If maintaining a wu-ftpd-compatible file transfer log is not important, either set xferlog_std_format to NO, comment the line with a hash sign (#), or delete the line entirely.

Opciones de red

A continuación se enumeran las directivas que afectan la manera en que vsftpd interactúa con la red.

  • accept_timeout — Specifies the amount of time for a client using passive mode to establish a connection.

    El valor predeterminado es 60.

  • anon_max_rate — Specifies the maximum data transfer rate for anonymous users in bytes per second.

    El valor predeterminado es 0, el cual no limita la tasa de transferencia.

  • connect_from_port_20 When enabled, vsftpd runs with enough privileges to open port 20 on the server during active mode data transfers. Disabling this option allows vsftpd to run with less privileges, but may be incompatible with some FTP clients.

    El valor predeterminado es NO. Observe que, en Fedora, el valor se establece a YES.

  • connect_timeout — Specifies the maximum amount of time a client using active mode has to respond to a data connection, in seconds.

    El valor predeterminado es 60.

  • data_connection_timeout — Specifies maximum amount of time data transfers are allowed to stall, in seconds. Once triggered, the connection to the remote client is closed.

    El valor predeterminado es 300.

  • ftp_data_port — Specifies the port used for active data connections when connect_from_port_20 is set to YES.

    El valor predeterminado es 20.

  • idle_session_timeout — Specifies the maximum amount of time between commands from a remote client. Once triggered, the connection to the remote client is closed.

    El valor predeterminado es 300.

  • listen_address — Specifies the IP address on which vsftpd listens for network connections.

    No hay ningún valor predeterminado para esta directiva.

    Ejecutar varias copias de vsftpd

    If running multiple copies of vsftpd serving different IP addresses, the configuration file for each copy of the vsftpd daemon must have a different value for this directive. See Starting Multiple Copies of vsftpd for more information about multihomed FTP servers.

  • listen_address6 — Specifies the IPv6 address on which vsftpd listens for network connections when listen_ipv6 is set to YES.

    No hay ningún valor predeterminado para esta directiva.

    Ejecutar varias copias de vsftpd

    If running multiple copies of vsftpd serving different IP addresses, the configuration file for each copy of the vsftpd daemon must have a different value for this directive. See Starting Multiple Copies of vsftpd for more information about multihomed FTP servers.

  • listen_port — Specifies the port on which vsftpd listens for network connections.

    El valor predeterminado es 21.

  • local_max_rate — Specifies the maximum rate data is transferred for local users logged into the server in bytes per second.

    El valor predeterminado es 0, el cual no limita la tasa de transferencia.

  • max_clients — Specifies the maximum number of simultaneous clients allowed to connect to the server when it is running in standalone mode. Any additional client connections would result in an error message.

    El valor predeterminado es 0, el cual no limita las conexiones.

  • max_per_ip — Specifies the maximum of clients allowed to connected from the same source IP address.

    El valor predeterminado es 0, el cual no limita las conexiones.

  • pasv_address — Specifies the IP address for the public facing IP address of the server for servers behind Network Address Translation (NAT) firewalls. This enables vsftpd to hand out the correct return address for passive mode connections.

    No hay ningún valor predeterminado para esta directiva.

  • pasv_enable — When enabled, passive mode connects are allowed.

    El valor predeterminado es YES.

  • pasv_max_port — Specifies the highest possible port sent to the FTP clients for passive mode connections. This setting is used to limit the port range so that firewall rules are easier to create.

    El valor predeterminado es 0, el cual no limita el intervalo de puertos pasivos más elevado. El valor no debe exceder 65535.

  • pasv_min_port — Specifies the lowest possible port sent to the FTP clients for passive mode connections. This setting is used to limit the port range so that firewall rules are easier to create.

    El valor predeterminado es 0, el cual no limita el intervalo de puertos pasivos más bajo. El valor no debe ser menor que 1024.

  • pasv_promiscuous — When enabled, data connections are not checked to make sure they are originating from the same IP address. This setting is only useful for certain types of tunneling.

    Evite activar la opción pasv_promiscuous

    Do not enable this option unless absolutely necessary as it disables an important security feature which verifies that passive mode connections originate from the same IP address as the control connection that initiates the data transfer.

    El valor predeterminado es NO.

  • port_enable — When enabled, active mode connects are allowed.

    El valor predeterminado es YES.

Recursos Adicionales

Para obtener más información acerca de vsftpd, consulte los recursos siguientes.

Documentación Instalada

  • The /usr/share/doc/vsftpd/ directory — This directory contains a README with basic information about the software. The TUNING file contains basic performance tuning tips and the SECURITY/ directory contains information about the security model employed by vsftpd.

  • vsftpd related man pages — There are a number of man pages for the daemon and configuration files. The following lists some of the more important man pages.

    Aplicaciones para servidores

    • man vsftpd: describe las opciones de línea de órdenes disponibles para vsftpd.

    Archivos de Configuración

    • man vsftpd.conf: contiene una lista detallada de opciones disponibles en el archivo de configuración de vsftpd.

    • man 5 hosts_access — Describes the format and options available within the TCP wrappers configuration files: hosts.allow and hosts.deny.

Sitios web útiles

Configuración de la impresora

La herramienta de configuración Impresoras sirve para configurar estos aparatos, dar mantenimiento a los archivos de configuración de los dispositivos mismos, los filtros de impresión y los directorios de cola, así como gestionar las clases de impresoras.

La herramienta se basa en el Sistema de Impresión Común de UNIX (CUPS, por sus siglas en inglés). Si ha actualizado el sistema Fedora a partir de una versión anterior que utilizaba CUPS, el proceso de actualización ha conservado las impresoras configuradas.

Uso de la aplicación web oy las herramientas de línea de comandos de CUPS

Puede llevar a cabo las mismas y otras operaciones sobre impresoras directamente desde la aplicación web CUPS o la línea de comandos. Para acceder a la aplicación, en un navegador web, vaya a http://localhost:631/. Para los manuales CUPS vea los enlaces en la pestaña Home del sitio web.

Iniciar la Herramienta de Configuración de Impresoras

Con la herramienta de configuración Impresoras puede llevar a cabo diversas operaciones sobre las impresoras existentes y configurar nuevas impresoras. También puede usar CUPS directamente (vaya a http://localhost:631/ para acceder a la aplicación web CUPS).

Para arrancar la herramienta de configuración Impresoras si está usando el escritorio GNOME, pulse la tecla Super para entrar en la Visión General de Actividades, teclee Impresoras y pulse Enter. Aparece la herramienta de configuración Impresoras. La tecla Super aparece de distintos modos, dependiendo del teclado y otro hardware pero con frecuencia es la tecla Windows o Command y normalmente está a la izquierda de la Barra espaciadora.

Aparece la ventana Impresoras representada en Ventana Configuración de Impresoras.

Ventana de Configuración de impresoras
Figura 1. Ventana de Configuración de impresoras

Iniciando el Ajuste de Impresora

El proceso de ajuste de impresora varia dependiendo del tipo de cola de la impresora.

Si está ajustando una impresora local conectada por USB, la impresora es descubierta y añadida automáticamente. Se le pedirá que confirme los paquetes a instalar y se le pedirá una contraseña de usuario root o administrador. Las impresoras locales conectadas por otros tipos de puerto necesitan ser ajustadas manualmente.

Siga este procedimiento para iniciar un ajuste manual de impresora:

  1. Arranque la herramienta de configuración Impresoras (vea Arrancando la Herramienta de Configuración de Impresoras).

  2. Seleccione Unlock para habilitar que se puedan hacer cambio. En la caja Authentication Required, teclee una contraseña de administrador o la del usuario root y confirme.

  3. Seleccione el signo mas (+) para abrir el diálogo Añadir una Nueva Impresora. Seleccione la impresora de la lista o teclee su dirección debajo.

Añadiendo una Impresora Local

Siga este procedimiento para añadir una impresora local conectado por un puerto distinto al puerto serie:

  1. Abra el diálogo Añadir…​ (vea Empezando el Ajuste de Impresora).

  2. Si el dispositivo no aparece automáticamente, seleccione el puerto al que está conectado la impresora en la lista de la izquierda (como Serial Port #1 o LPT #1).

  3. A la derecha, introduzca las propiedades de la conexión:

    para Enter URI

    URI (por ejemplo archivo:/dev/lp0)

    para Puerto Serie

    Baud Rate

Parity

Data Bits

Flow Control

Adding a local printer
Figura 2. Adding a local printer
  1. Click Forward.

  2. Select the printer model. See Selecting the Printer Model and Finishing for details.

Adding an AppSocket/HP JetDirect printer

Follow this procedure to add an AppSocket/HP JetDirect printer:

  1. Open the Add a New Printer dialog (refer to Starting the Printers Configuration Tool).

  2. In the list on the left, select Network Printer  AppSocket/HP JetDirect.

  3. On the right, enter the connection settings:

    Hostname

    Printer host name or IP address.

    Port Number

    Printer port listening for print jobs (9100 by default).

Adding a JetDirect Printer
Figura 3. Adding a JetDirect printer
  1. Click Forward.

  2. Select the printer model. See Selecting the Printer Model and Finishing for details.

Adding an IPP Printer

An IPP printer is a printer attached to a different system on the same TCP/IP network. The system this printer is attached to may either be running CUPS or simply configured to use IPP.

If a firewall is enabled on the printer server, then the firewall must be configured to allow incoming TCP connections on port 631. Note that the CUPS browsing protocol allows client machines to discover shared CUPS queues automatically. To enable this, the firewall on the client machine must be configured to allow incoming UDP packets on port 631.

Follow this procedure to add an IPP printer:

  1. Open the Printers dialog (refer to Starting Printer Setup).

  2. In the list of devices on the left, select Network Printer and Internet Printing Protocol (ipp) or Internet Printing Protocol (https).

  3. On the right, enter the connection settings:

    Host

    The host name of the IPP printer.

    Queue

    The queue name to be given to the new queue (if the box is left empty, a name based on the device node will be used).

Networked IPP Printer
Figura 4. Adding an IPP printer
  1. Optionally, click Verify to detect the printer.

  2. Click Forward to continue.

  3. Select the printer model. See Selecting the Printer Model and Finishing for details.

Adding an LPD/LPR Host or Printer

Follow this procedure to add an LPD/LPR host or printer:

  1. Open the New Printer dialog (refer to Starting Printer Setup).

  2. In the list of devices on the left, select Network Printer  LPD/LPR Host or Printer.

  3. On the right, enter the connection settings:

    Host

    The host name of the LPD/LPR printer or host.

Optionally, click Probe to find queues on the LPD host.

Queue

The queue name to be given to the new queue (if the box is left empty, a name based on the device node will be used).

Adding an LPD/LPR Printer
Figura 5. Adding an LPD/LPR printer
  1. Click Forward to continue.

  2. Select the printer model. See Selecting the Printer Model and Finishing for details.

Adding a Samba (SMB) printer

Follow this procedure to add a Samba printer:

Installing the samba-client package

Note that in order to add a Samba printer, you need to have the samba-client package installed. You can do so by running, as root:

dnf install samba-client

For more information on installing packages with DNF, refer to Installing Packages.

  1. Open the New Printer dialog (refer to Starting Printer Setup).

  2. In the list on the left, select Network Printer  Windows Printer via SAMBA.

  3. Enter the SMB address in the smb:// field. Use the format computer name/printer share. In Adding a SMB printer, the computer name is dellbox and the printer share is r2.

SMB Printer
Figura 6. Adding a SMB printer
  1. Click Browse to see the available workgroups/domains. To display only queues of a particular host, type in the host name (NetBios name) and click Browse.

  2. Select either of the options:

    1. Prompt user if authentication is required: user name and password are collected from the user when printing a document.

    2. Set authentication details now: provide authentication information now so it is not required later. In the Username field, enter the user name to access the printer. This user must exist on the SMB system, and the user must have permission to access the printer. The default user name is typically guest for Windows servers, or nobody for Samba servers.

  3. Enter the Password (if required) for the user specified in the Username field.

Be careful when choosing a password

Samba printer user names and passwords are stored in the printer server as unencrypted files readable by root and the Linux Printing Daemon, lpd. Thus, other users that have root access to the printer server can view the user name and password you use to access the Samba printer.

Therefore, when you choose a user name and password to access a Samba printer, it is advisable that you choose a password that is different from what you use to access your local Fedora system.

If there are files shared on the Samba print server, it is recommended that they also use a password different from what is used by the print queue.

  1. Click Verify to test the connection. Upon successful verification, a dialog box appears confirming printer share accessibility.

  2. Click Forward.

  3. Select the printer model. See Selecting the Printer Model and Finishing for details.

Selecting the Printer Model and Finishing

Once you have properly selected a printer connection type, the system attempts to acquire a driver. If the process fails, you can locate or search for the driver resources manually.

Follow this procedure to provide the printer driver and finish the installation:

  1. In the window displayed after the automatic driver detection has failed, select one of the following options:

    1. Select printer from database — the system chooses a driver based on the selected make of your printer from the list of Makes. If your printer model is not listed, choose Generic.

    2. Provide PPD file — the system uses the provided PostScript Printer Description (PPD) file for installation. A PPD file may also be delivered with your printer as being normally provided by the manufacturer. If the PPD file is available, you can choose this option and use the browser bar below the option description to select the PPD file.

    3. Search for a printer driver to download — enter the make and model of your printer into the Make and model field to search on OpenPrinting.org for the appropriate packages.

Selecting a printer brand from the printer database brands.
Figura 7. Selecting a printer brand
  1. Depending on your previous choice provide details in the area displayed below:

    • Printer brand for the Select printer from database option.

    • PPD file location for the Provide PPD file option.

    • Printer make and model for the Search for a printer driver to download option.

  2. Click Forward to continue.

  3. If applicable for your option, window shown in Selecting a printer model appears. Choose the corresponding model in the Models column on the left.

Selecting a printer driver

On the right, the recommended printer driver is automatically selected; however, you can select another available driver. The print driver processes the data that you want to print into a format the printer can understand. Since a local printer is attached directly to your computer, you need a printer driver to process the data that is sent to the printer.

Selecting a Printer Model with a Driver Menu
Figura 8. Selecting a printer model
  1. Click Forward.

  2. Under the Describe Printer enter a unique name for the printer in the Printer Name field. The printer name can contain letters, numbers, dashes (-), and underscores (_); it must not contain any spaces. You can also use the Description and Location fields to add further printer information. Both fields are optional, and may contain spaces.

Printer Setup
Figura 9. Printer setup
  1. Click Apply to confirm your printer configuration and add the print queue if the settings are correct. Click Back to modify the printer configuration.

  2. After the changes are applied, a dialog box appears allowing you to print a test page. Click Print Test Page to print a test page now. Alternatively, you can print a test page later as described in Printing a Test Page.

Printing a Test Page

After you have set up a printer or changed a printer configuration, print a test page to make sure the printer is functioning properly:

  1. Right-click the printer in the Printing window and click Properties.

  2. In the Properties window, click Settings on the left.

  3. On the displayed Settings tab, click the Print Test Page button.

Modifying Existing Printers

To delete an existing printer, in the Printer configuration window, select the printer and go to Printer  Delete. Confirm the printer deletion. Alternatively, press the Delete key.

To set the default printer, right-click the printer in the printer list and click the Set As Default button in the context menu.

The Settings Page

To change printer driver configuration, double-click the corresponding name in the Printer list and click the Settings label on the left to display the Settings page.

You can modify printer settings such as make and model, print a test page, change the device location (URI), and more.

Settings Page
Figura 10. Settings page

The Policies Page

Click the Policies button on the left to change settings in printer state and print output.

You can select the printer states, configure the Error Policy of the printer (you can decide to abort the print job, retry, or stop it if an error occurs).

You can also create a banner page (a page that describes aspects of the print job such as the originating printer, the user name from the which the job originated, and the security status of the document being printed): click the Starting Banner or Ending Banner drop-down menu and choose the option that best describes the nature of the print jobs (for example, confidential).

Sharing Printers

On the Policies page, you can mark a printer as shared: if a printer is shared, users published on the network can use it. To allow the sharing function for printers, go to Server  Settings and select Publish shared printers connected to this system.

Policies Page
Figura 11. Policies page

Make sure that the firewall allows incoming TCP connections to port 631, the port for the Network Printing Server (IPP) protocol. To allow IPP traffic through the firewall on Fedora 38, make use of firewalld's IPP service. To do so, proceed as follows:

Enabling IPP Service in firewalld
  1. To start the graphical firewall-config tool, press the Super key to enter the Activities Overview, type firewall and then press Enter. The Firewall Configuration window opens. You will be prompted for an administrator or root password.

Alternatively, to start the graphical firewall configuration tool using the command line, enter the following command as root user:

~]# firewall-config

The Firewall Configuration window opens.

Look for the word “Connected” in the lower left corner. This indicates that the firewall-config tool is connected to the user space daemon, firewalld.

To immediately change the current firewall settings, ensure the drop-down selection menu labeled Configuration is set to Runtime. Alternatively, to edit the settings to be applied at the next system start, or firewall reload, select Permanent from the drop-down list.

  1. Select the Zones tab and then select the firewall zone to correspond with the network interface to be used. The default is the public zone. The Interfaces tab shows what interfaces have been assigned to a zone.

  2. Select the Services tab and then select the ipp service to enable sharing. The ipp-client service is required for accessing network printers.

  3. Close the firewall-config tool.

The Access Control Page

You can change user-level access to the configured printer on the Access Control page. Click the Access Control label on the left to display the page. Select either Allow printing for everyone except these users or Deny printing for everyone except these users and define the user set below: enter the user name in the text box and click the Add button to add the user to the user set.

Access Control Page
Figura 12. Access Control page
The Printer Options Page

The Printer Options page contains various configuration options for the printer media and output, and its content may vary from printer to printer. It contains general printing, paper, quality, and printing size settings.

Printer Options Page
Figura 13. Printer Options page
Job Options Page

On the Job Options page, you can detail the printer job options. Click the Job Options label on the left to display the page. Edit the default settings to apply custom job options, such as number of copies, orientation, pages per side, scaling (increase or decrease the size of the printable area, which can be used to fit an oversize print area onto a smaller physical sheet of print medium), detailed text options, and custom job options.

Job Options Page
Figura 14. Job Options page
Ink/Toner Levels Page

The Ink/Toner Levels page contains details on toner status if available and printer status messages. Click the Ink/Toner Levels label on the left to display the page.

Ink/Toner Levels Page
Figura 15. Ink/Toner Levels page

Managing Print Jobs

When you send a print job to the printer daemon, such as printing a text file from Emacs or printing an image from GIMP, the print job is added to the print spool queue. The print spool queue is a list of print jobs that have been sent to the printer and information about each print request, such as the status of the request, the job number, and more.

During the printing process, messages informing about the process appear in the notification area.

GNOME Print Status
Figura 16. GNOME Print Status

To cancel, hold, release, reprint or authenticate a print job, select the job in the GNOME Print Status and on the Job menu, click the respective command.

To view the list of print jobs in the print spool from a shell prompt, type the command lpstat -o. The last few lines look similar to the following:

Ejemplo 1. Example of lpstat -o output
$ lpstat -o
Charlie-60              twaugh            1024   Tue 08 Feb 2011 16:42:11 GMT
Aaron-61                twaugh            1024   Tue 08 Feb 2011 16:42:44 GMT
Ben-62                  root              1024   Tue 08 Feb 2011 16:45:42 GMT

If you want to cancel a print job, find the job number of the request with the command lpstat -o and then use the command cancel job number. For example, cancel 60 would cancel the print job in Example of lpstat -o output. You cannot cancel print jobs that were started by other users with the cancel command. However, you can enforce deletion of such job by issuing the cancel -U root job_number command. To prevent such canceling, change the printer operation policy to Authenticated to force root authentication.

You can also print a file directly from a shell prompt. For example, the command lp sample.txt prints the text file sample.txt. The print filter determines what type of file it is and converts it into a format the printer can understand.

Recursos Adicionales

To learn more about printing on Fedora, see the following resources.

Documentación Instalada

man lp

The manual page for the lpr command that allows you to print files from the command line.

man cancel

The manual page for the command-line utility to remove print jobs from the print queue.

man mpage

The manual page for the command-line utility to print multiple pages on one sheet of paper.

man cupsd

The manual page for the CUPS printer daemon.

man cupsd.conf

The manual page for the CUPS printer daemon configuration file.

man classes.conf

The manual page for the class configuration file for CUPS.

man lpstat

The manual page for the lpstat command, which displays status information about classes, jobs, and printers.

Sitios web útiles

https://wiki.linuxfoundation.org/openprinting/start

Open Printing contains a large amount of information about printing in Linux.

https://www.cups.org/

Documentation, FAQs, and newsgroups about CUPS.