per eseguire l'azione richiesta, wordpress deve accedere al tuo server web. per favore inserisci il tuo ftp
-
-
È un'installazione localhost?Intal caso,vedere: 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,questa è * NON *installazione localhost & la risposta "accettata" dal link che commenti è di cambiare ricorsivamente laproprietà di una directory di wordpress a `nessuno` - questononfunzioneràperme perché` httpd` vieneeseguito come `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 Sembra chei tuoifile siano diproprietà di root.apache almomento.Haiprovato apache.apacheinvece dinessuno?@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
-
@TimMaloneimpostandofiles/directory come `apache.apache` o` root.apache`nonfarebbe alcuna differenza,fintanto che `httpd` vieneeseguito come` apache`e `uid` di` apache`faparte di `Ilgruppo di apache`gid` è lo stesso,perchéi mieipermessi sonoimpostati su `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,qualcos'altro daprovare:imposta FS_METHOD su "direct"in 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
-
@TimMaloneper https://codex.wordpress.org/Editing_wp-config.php#WordPress_Upgrade_Constants - `Nota che latua selezione qui hagraviimplicazioniper la sicurezza.`@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 Vedi 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 risposta
- voti
-
- 2017-06-22
Aggiungi quanto segue a wp-config.php:
define( 'FS_METHOD', 'direct' );
Fammi sapere comefunzionaperte.
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
-
hafunzionatoperme ameno chetunon abbia cattive autorizzazioninelfile system.Btw l'ho aggiunto all'inizio del 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
-
Assicurati di leggereilpost a cui Alexus è collegatoprima di utilizzare questometodo.Questometodofunziona sicuramente (ha risoltoilproblemaperme),manon dovresti assolutamente utilizzare questometodoin un ambiente di hosting condiviso oin qualsiasi ambiente a rischioin cuipotresti compromettere la sicurezzain questomodo.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
-
dopo aver aggiunto questo,ricevo questoerrore: `Aggiornamentonon riuscito:non èpossibileinstallare l'aggiornamentoperchénon saremoin grado di copiare alcunifile.Ciò è solitamente dovuto apermessi difileincoerentiafter 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
Ciò significa che WordPress dispone di autorizzazioni limitateper apportaremodifiche alla cartellain cui è statoinstallato.
Per risolvere questoproblema,tutto ciò che devifare èfornire le autorizzazioninecessarieper lo stesso.
Eseguiil seguente comandoneltuoterminale/Putty/prompt della riga di comando dopoesserti connesso altuo servertramite SSH:
sudo chown -R apache:apache /var/www/html
Checkout questo articolo peri dettagli completi.
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.
-
ipermessi vannobene,rileggi lamia domanda)permissions are fine, re-read my question)
- 0
- 2016-08-05
- alexus
-
chown: utentenon valido: "apache: apache"chown: invalid user: ‘apache:apache’
- 3
- 2018-02-02
- numediaweb
-
Ricorda,Apachepuòessere utenti diversiin diverse versioni di Linux.Quindipuoiprovarei gruppi
e vedere se si verifica unerrore omeno,poiché l'utentee ilgruppoper Apache di solito sonogli stessi.Quindi utilizzare l'utente corretto.Ilpiù comunein Ubuntu è "www-data: www-data" o "www: www"peril chowning deifile 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
-
Dopo avertrovatoilnome utente corretto,hafunzionato allagrande (vedi anche [comandoperelencaretuttigli utenti] (https://askubuntu.com/questions/410244/a-command-to-list-all-users-and-how-to-add-delete-modify-users/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
-
Nel casoin cui desideri utilizzarlo su OSX,usa _www: _www (Mojave,non so cosa sarebbein altre versioni)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
Anche se è deltutto corretto avere laproprietà come
root:apache
coni permessi 775e httpdperessereeseguito comeapache
,a Wordpressnonpiace questo. Vuole cheilproprietario siaapache
,come dawp-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 ); }
Iltuo sarebbe:
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'; }
Se $ wp_file_owner è uguale a $temp_file_owner alloraprocedi. Iltuo verrebbe catturatoin elseif,che secondoil commentonon consente dieliminare/creare,ma solo di aggiornare (l'ho verificato aggiornandoil codice di unplugin da Wordpress,e hafunzionato).
Nota chenon hoesaminato afondoil codice,questa è solo lamia rapidainterpretazione. Ho avuto lo stessoproblemae una volta cambiato user:groupin modo che l'utente httpdfosse ancheilproprietario delfile,nonmi sonopiù richieste le credenziali 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ì,cambiareilproprietarioin "www-data" hafunzionatoperme.WordPress divertente!Yup, changing the owner to `www-data` worked for me. Funny WordPress!
- 1
- 2018-08-30
- ankush981
-
scopertainteressante,loesaminerò ...grazie +1 dapartemia)interesting find, i will look into that... thank you +1 from me)
- 0
- 2019-12-16
- alexus
-
- 2016-06-03
Non è una risposta diretta,maprobabilmente va detto: questo è unproblema che dovrestievitare di risolvere ameno chetunon stiaparlando di uno sviluppo locale,nel qual casopuoi semplicementeimpostarei permessi su 777.
Ilmotivo è che seil server webpuò sovrascrivereiltuo codice,anche qualsiasi codice dannosoin esecuzione su diesso saràin grado difarlo.Il rischio èmoltopiùgrande della comodità di risparmiarepochi secondinon dovendo digitare le credenzialiftp.
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
Anche se la domandanon èpiù cosìnuova,voglio aggiungerei miei due centesimi anche su questoproblema.
Molti utenti hanno Centos (7) sulproprio server VPSe le seguenti righe di codicepotrebbero risolvereil loroproblema.
Imho hatutto a chefare con SELinux cheimpedisce a WordPress di svolgereilproprio lavoro come desiderato. Vatroppo lontanoper spiegare cosa sia SELinux e cosafa. Cordiali saluti,l'introduzioneinizia con:
Security-Enhanced Linux (SELinux) è unmeccanismo di sicurezza MAC (obbligatorioperil controllo dell'accesso)implementatonel kernel.
Solo 3passaggi da seguire:
- 1 Apri unterminale (o accedi al servertramite SSH)
- 2 Aggiungi la seguente riga di codice
chcon -R -t httpd_sys_content_t/var/www/html/wordpress
- 3 Aggiungi la seconda riga di codice
chcon -R -t httpd_sys_rw_content_t/var/www/html/wordpress
Nessun riavvio dal server o riavvio da qualsiasi demonenecessario.
Non dirò che aiutatutti,maper coloro chenon hanno disabilitato SELinux dovrebbeessere un sollievo.
Saluti
Nota: adattati alletueesigenze (ovveroilpercorso a WordPress)
modifica: assicurati di rimuovere la riga
define ("FS_METHOD","direct");
quando è/è stata usatainwp-config.php
perché è assolutamente vietato se le righe di codiceprecedentifanno come si vuole.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
Nelmio caso,ho risoltoilproblematornando da GIT allamodalità FTP.
Nientepiù avvisi.
Forse questo aiuterà anche qualcun altro.
In my case, I solved this by switching from GIT back to FTP mode.
No more warning.
Perhaps that'll help somebody else too.
Sto seguendoil Modificai permessi deifile «WordPress Codex ,ma quando ciprovo aggiornae/oinstalla
plugin
e/otheme
tramitewp-admin
,ottengo quanto segue:dal livello delfile system:
httpd
vieneeseguito comeapache
:Mipiacerebbepotereseguire l'azione richiesta (
install
e/oupdate
)tramite/wp-admin
senza credenziali FTP.Comepossofarlo?