para realizar la acción solicitada, wordpress necesita acceder a su servidor web. por favor ingrese su ftp
-
-
¿Esesta unainstalación de localhost?Sies así,consulte: http://wordpress.stackexchange.com/questions/19649/wordpress-on-localhost-lamp-doesnt-let-me-install-pluginsIs this a localhost installation? If so, see: http://wordpress.stackexchange.com/questions/19649/wordpress-on-localhost-lamp-doesnt-let-me-install-plugins
- 1
- 2016-06-02
- Greg McMullen
-
@GregMcMullenno,estoes * NO *instalación de localhost y la respuesta "aceptada" delenlace que comentaes cambiar deforma recursiva lapropiedad de un directorio de wordpress a `nadie`;estonome funcionará debido a que` httpd` seejecuta como `apache`.@GregMcMullen no, this is *NOT* localhost installation & "accepted" answer from link that you comment is to recursively change ownership of a wordpress directory to `nobody` - this won't work for me due to `httpd` runs as `apache`.
- 1
- 2016-06-02
- alexus
-
@alexus Parece que sus archivospertenecen a root.apacheen estemomento.¿Probaste apache.apacheen lugar denadie?@alexus It looks like your files are owned by root.apache at the moment. Did you try apache.apache instead of nobody?
- 0
- 2016-06-02
- Tim Malone
-
@TimMalone configurar archivos/directorio como `apache.apache` o` root.apache`no haríaninguna diferencia,siempre que `httpd` seejecute como` apache`,yel `uid` de` apache` seaparte de `Apache`grupo de `gid`,es lomismo,porquemispermisos seestablecieronen`g + w`.@TimMalone setting files/directory as `apache.apache` or `root.apache` wouldn't make any difference, as long as `httpd` runs as `apache`, and `apache`'s `uid` is part of `apache` `gid`'s group, it's all the same, because my permissions set to `g+w`.
- 0
- 2016-06-02
- alexus
-
@alexus Ok,algomásparaprobar: configure FS_METHODen 'directo'en wp-config.php (https://codex.wordpress.org/Editing_wp-config.php#WordPress_Upgrade_Constants)@alexus Ok, something else to try - set FS_METHOD to 'direct' in wp-config.php (https://codex.wordpress.org/Editing_wp-config.php#WordPress_Upgrade_Constants)
- 0
- 2016-06-02
- Tim Malone
-
@TimMalone según https://codex.wordpress.org/Editing_wp-config.php#WordPress_Upgrade_Constants - `Tengaen cuenta que su selección aquítiene seriasimplicaciones de seguridad.@TimMalone per https://codex.wordpress.org/Editing_wp-config.php#WordPress_Upgrade_Constants - `Note that your selection here has serious security implications.`
- 0
- 2016-06-02
- alexus
-
@alexus Consulte http://wordpress.stackexchange.com/questions/189554/what-security-concerns-should-i-have-when-setting-fs-method-to-direct-in-wp-co@alexus See http://wordpress.stackexchange.com/questions/189554/what-security-concerns-should-i-have-when-setting-fs-method-to-direct-in-wp-co
- 0
- 2016-06-02
- Tim Malone
-
6 respuestas
- votos
-
- 2017-06-22
Agregue lo siguiente a wp-config.php:
define( 'FS_METHOD', 'direct' );
Hágame saber cómo lefunciona.
Add the following to wp-config.php:
define( 'FS_METHOD', 'direct' );
Let me know how it works for you.
-
https://wordpress.stackexchange.com/questions/189554/what-security-concerns-should-i-have-when-setting-fs-method-to-direct-in-wp-cohttps://wordpress.stackexchange.com/questions/189554/what-security-concerns-should-i-have-when-setting-fs-method-to-direct-in-wp-co
- 2
- 2017-06-22
- alexus
-
funcionóparamí amenos quetengamalospermisosen el sistema de archivos.Por cierto,lo agreguéen laparte superior de wp-config.phpworked for me unless you have bad permissions in the file system. Btw I added it at the very top of the wp-config.php
- 0
- 2018-09-28
- Toskan
-
Asegúrese de leer lapublicación a la que Alexus vinculó antes de usarestemétodo.Estemétodo definitivamentefunciona (me resolvióelproblema),pero definitivamenteno debe usarestemétodoen unentorno de alojamiento compartido oen cualquierentorno de riesgoen el quepueda comprometer la seguridad al haceresto.Make sure to read the post Alexus linked to before using this method. This method definitely works (it solved the problem for me), but you should definitely not use this method in a shared hosting environment or any at-risk environment where you could compromise security by doing this.
- 0
- 2019-05-18
- JamesHoux
-
después de agregaresto,obtengoesteerror: `Actualizaciónfallida: la actualizaciónno sepuedeinstalarporquenopodremos copiar algunos archivos.Estogeneralmente se debe apermisos de archivoinconsistentes.after adding this I have getting this error: `Update Failed: The update cannot be installed because we will be unable to copy some files. This is usually due to inconsistent file permissions.`
- 0
- 2020-03-18
- Sabbir
-
- 2016-08-05
Esto significa que WordPresstiene permisos limitadospara realizar cambiosen la carpetaen la que seinstaló.
Para solucionaresteproblema,todo lo quenecesita haceresproporcionar lospermisosnecesariosparaelmismo.
Ejecuteel siguiente comandoen suterminal/Putty/Símbolo del sistema después de conectarse a su servidor através de SSH:
sudo chown -R apache:apache /var/www/html
Realizarpedido este artículo para obtenertodos los detalles.
This means that WordPress is having limited permission for making changes in the folder that it was installed.
In-order to fix this, all that you need to do is provide necessary permissions for the same.
Run the following Command in your Terminal / Putty / Commandline Prompt after connecting to your Server via SSH:
sudo chown -R apache:apache /var/www/html
Checkout this article for full details.
-
lospermisosestánbien,vuelva a leermi pregunta)permissions are fine, re-read my question)
- 0
- 2016-08-05
- alexus
-
chown: usuariono válido: "apache: apache"chown: invalid user: ‘apache:apache’
- 3
- 2018-02-02
- numediaweb
-
Recuerde,Apachepuedetener diferentes usuariosen diferentes versiones de Linux.Así quepuedesprobar con losgrupos
y ver si hayerrores ono,ya queel usuario yelgrupo de Apache suelen ser losmismos.Luego useel usuario correcto.Elmás comúnen Ubuntues "www-data: www-data" o "www: www"para usar archivos Apache. Remember, Apache can be different users in different flavors of Linux. So you can try groupsand see if it errors out or not, since the user and group for Apache is usually the same. Then use the correct user. The most common in Ubuntu is "www-data:www-data" or "www:www" for chown-ing Apache files. - 2
- 2019-01-25
- MontyThreeCard
-
Después de quepudeencontrarelnombre de usuario correcto,estofuncionómuybien (consultetambién [comandoparaenumerartodos los usuarios] (https://askubuntu.com/questions/410244/a-command-to-list-all-users-and-how-to-agregar-eliminar-modificar-usuarios/410274 # 410274))After I could find the right user name this worked just great (see also [command to list all users](https://askubuntu.com/questions/410244/a-command-to-list-all-users-and-how-to-add-delete-modify-users/410274#410274))
- 0
- 2020-01-08
- Top-Master
-
En caso de que quiera usarloen OSX,use _www: _www (Mojave,no sé qué seríaen otras versiones)In case you want to use it on OSX, use _www:_www (Mojave, don't know what it wolud be in other versions)
- 0
- 2020-05-06
- Larzan
-
- 2017-08-23
Aunqueestotalmente correctotener lapropiedad como
root:apache
conpermisos 775,y httpdparaejecutarse comoapache
,a Wordpressno legustaesto. Quiere queelpropietario seaapache
,segúnwp-admin/includes/file.php
:// Attempt to determine the file owner of the WordPress files, and that of newly created files $wp_file_owner = $temp_file_owner = false; if ( function_exists('fileowner') ) { $wp_file_owner = @fileowner( __FILE__ ); $temp_file_owner = @fileowner( $temp_file_name ); }
Eltuyo sería:
wp_file_owner=root
temp_file_owner=apacheif ( $wp_file_owner !== false && $wp_file_owner === $temp_file_owner ) { // WordPress is creating files as the same owner as the WordPress files, // this means it's safe to modify & create new files via PHP. $method = 'direct'; $GLOBALS['_wp_filesystem_direct_method'] = 'file_owner'; } elseif ( $allow_relaxed_file_ownership ) { // The $context directory is writable, and $allow_relaxed_file_ownership is set, this means we can modify files // safely in this directory. This mode doesn't create new files, only alter existing ones. $method = 'direct'; $GLOBALS['_wp_filesystem_direct_method'] = 'relaxed_ownership'; }
Si $ wp_file_owneresigual que $temp_file_owner,proceda. Eltuyo quedaría atrapadoen elelseif,que segúnel comentarionopermiteeliminar/crear,sino solo actualizaciones (verifiquéesto actualizandoel código de un complemento desde Wordpress,yfuncionó).
Tengaen cuenta quenomiré detenidamenteel código,estaes solomi interpretación rápida. Tuveelmismoproblema y una vez que cambié de usuario:grupopara queel usuario httpdtambién seaelpropietario del archivo,yanome solicitó las credenciales de FTP.
Even though it is totally correct to have the ownership as
root:apache
with permissions 775, and httpd to run asapache
, Wordpress does not like this. It wants the owner to beapache
, as perwp-admin/includes/file.php
:// Attempt to determine the file owner of the WordPress files, and that of newly created files $wp_file_owner = $temp_file_owner = false; if ( function_exists('fileowner') ) { $wp_file_owner = @fileowner( __FILE__ ); $temp_file_owner = @fileowner( $temp_file_name ); }
Yours would be:
wp_file_owner = root
temp_file_owner = apacheif ( $wp_file_owner !== false && $wp_file_owner === $temp_file_owner ) { // WordPress is creating files as the same owner as the WordPress files, // this means it's safe to modify & create new files via PHP. $method = 'direct'; $GLOBALS['_wp_filesystem_direct_method'] = 'file_owner'; } elseif ( $allow_relaxed_file_ownership ) { // The $context directory is writable, and $allow_relaxed_file_ownership is set, this means we can modify files // safely in this directory. This mode doesn't create new files, only alter existing ones. $method = 'direct'; $GLOBALS['_wp_filesystem_direct_method'] = 'relaxed_ownership'; }
If $wp_file_owner is same as $temp_file_owner then proceed. Yours would be caught in the elseif, which according to the comment does not allow delete/create, but only updates (I verified this by updating the code of a plugin from within Wordpress, and it worked).
Note I did not extensively look through the code, this is just my quick interpretation. I had the same problem and once I switched user:group so that the httpd user is also the file owner, it did not prompt for FTP credentials anymore.
-
Sí,cambiarelpropietario a `www-data`funcionóparamí.WordPress divertido!Yup, changing the owner to `www-data` worked for me. Funny WordPress!
- 1
- 2018-08-30
- ankush981
-
hallazgointeresante,loinvestigaré ...gracias +1 demi parte)interesting find, i will look into that... thank you +1 from me)
- 0
- 2019-12-16
- alexus
-
- 2016-06-03
Noes una respuesta directa,peroprobablemente hay que decirlo:estees unproblema que debeevitar resolver amenos queesté hablando de un desarrollo local,en cuyo casopuedeestablecer lospermisosen 777.
La razónes que siel servidor webpuede sobrescribir su código,cualquier códigomalicioso que seejecuteen éltambiénpodrá hacerlo.El riesgoesmuchomayor que la conveniencia de ahorrar unos segundos alnotener queescribir las credenciales deftp.
Not a direct answer, but probably has to be said - this is one problem you should avoid solving unless you are talking about a local development in which case you can just set permissions to 777.
The reason is that if the webserver can overwrite your code, then any malicious code running on it will be able to do that as well. The risk is just so much bigger than the convenience of saving few seconds by not having to type the ftp credentials.
-
- 2018-05-01
Aunque lapregunta yanoestannueva,también quiero sumarmis dos centavosen estetema.
Muchaspersonastienen Centos (7)en su servidor VPS y las siguientes líneas de códigopodrían resolver suproblema.
Imhotiene todo que ver con SELinux queimpide que WordPress haga sutrabajo como se desea. Explica demasiado quées SELinux y qué hace. Para suinformación,laintroducción comienza con:
Security-Enhanced Linux (SELinux)es unmecanismo de seguridad de control de acceso obligatorio (MAC)implementadoen el kernel.
Solo debe seguir 3pasos:
- 1 Abra unaterminal (o acceda al servidor através de SSH)
- 2 Agregue la siguiente línea de código
chcon -R -t httpd_sys_content_t/var/www/html/wordpress
- 3 Agregue una segunda línea de código
chcon -R -t httpd_sys_rw_content_t/var/www/html/wordpress
Noesnecesario reiniciar desdeel servidorni reiniciar desde cualquier demonio.
No diré que ayude atodos,peropara aquellos queno deshabilitaron SELinux debería ser un alivio.
Saludos
Nota: ajústese a suspropiasnecesidades (es decir,la ruta a WordPress)
editar: asegúrese deeliminar la línea
define ("FS_METHOD","direct");
cuando se usa/se usóenwp-config.php
porqueesoes absolutamenteimposible cuando las líneas de código anteriores hacen lo que se desea.Although the question is not that new anymore I want to add my two cents on this issue also.
A lot of ppl have Centos(7) on their VPS server and following code lines could solve their problem.
Imho has all to do with SELinux which withholds WordPress from doing it's job as wished. It goes to far to explain what SELinux is and what it does. FYI the introduction starts with:
Security-Enhanced Linux (SELinux) is a mandatory access control (MAC) security mechanism implemented in the kernel.
Only 3 steps to folow:
- 1 Open a terminal (or access the server through SSH)
- 2 Add following code line
chcon -R -t httpd_sys_content_t /var/www/html/wordpress
- 3 Add second code line
chcon -R -t httpd_sys_rw_content_t /var/www/html/wordpress
No reboot from the server or restart from any daemon needed.
I won't say it helps everybody but for those who didn't disable SELinux it should be a relieve.
Cheers
Note: Please adjust to your own needs (meaning path to WordPress)
edit: be sure to remove the line
define("FS_METHOD", "direct");
when it is/was used inwp-config.php
because that's absolutely a no go when above code lines do as wanted. -
- 2018-08-16
Enmi caso,resolvíesto cambiando de GIT denuevo almodo FTP.
Nomás advertencias.
Quizásesotambién ayude a alguienmás.
In my case, I solved this by switching from GIT back to FTP mode.
No more warning.
Perhaps that'll help somebody else too.
Sigo Cambiando lospermisos de archivo «WordPress Codex ,pero cuandointento actualizar y/oinstalar
plugin
y/otheme
através dewp-admin
,obtengo lo siguiente:desdeelnivel del sistema de archivos:
httpd
seejecuta comoapache
:Megustaríapoder realizar la acción solicitada (
install
y/oupdate
) através de/wp-admin
sin credenciales FTP.¿Cómopuedo hacereso?