Errore 403 in creazione/modifica contenuti

6 contenuti / 0 new
Ultimo contenuto
Anonimo (non verificato)
Ritratto di Anonimo
Errore 403 in creazione/modifica contenuti

Ogni volta che proovo a creare o editare un contenuto già esistente mi viene fuori questo errore, come risolvo?

403 Forbidden
You don't have permission to access on this server. Apache/2.2.16 (Debian) Server at Port 80

Se provo a modiifcare un contenuto in Panel ho questo errore

Si è verificato un errore HTTP in AJAX.
Codice HTTP di risposta: 403
Di seguito le informazioni di debug.
Percorso: /drupal/panels/ajax/editor/edit-pane/1/5/form
StatusText: Forbidden
ResponseText:
403 Forbidden
Forbidden
You don't have permission to access /drupal/panels/ajax/editor/edit-pane/1/5/form
on this server.
Apache/2.2.16 (Debian) Server at www.torriland.com Port 80

Drupal Version:

Ciao Nico,

ho riscontrato anch'io questo errore con Panel. Succede se hai il sito multilingua. Non ho trovato il motivo ma un workaround, gioca con la path, prova ad accedere al sito in italiano e fare modifica, anche per i nodi in lingua, prova rimuovendo il prefisso (en per esempio).

Mi trovi su Google+

NicoCaldo (non verificato)
Ritratto di Anonimo

Peccato che io non abbia nessun contenuto multilanguage attivo haha
i moduli multilanguage sono disatiivati

Meggis (non verificato)
Ritratto di Anonimo

!! You don't have permission to access /drupal/panels/ajax/editor/edit-pane/1/5/form !!
change 0775 chmod

NicoCaldo (non verificato)
Ritratto di Anonimo

Which permiss I have to change?

Meggis (non verificato)
Ritratto di Anonimo

Ciao, fai girare questo script per controllare i permessi di drupal (default 775, 644)
oppure metti le direttive nell'htaccess (vedi sotto)

<?php
<?php
$file_perms
= 0644;
$dir_perms = 0755;
//
// This object lets you search for one or more files
// in one or more directories using regular expressions
// with the option to search sub directories and ignore case.
//
class file_search {
  var
$found = array();
  var
$dirs = array();
  function
file_search($files, $dirs = '.', $sub = 1, $case = 0) {
   
$dirs = (!is_array($dirs)) ? array($dirs) : $dirs;
    foreach (
$dirs as $dir) {
     
$dir .= (!@ereg('/$', $dir)) ? '/' : '';
     
$directory = @opendir($dir);
      while ((
$file = @readdir($directory)) !== false) {
        if (
$file != '.' && $file != '..') {
          if (
$sub && is_dir($dir.$file)) {
           
$this->dirs[] = $dir.$file;
           
$this->file_search($files, $dir.$file, $sub, $case);
          } else {
           
$files = (!is_array($files)) ? array($files) : $files;
            foreach (
$files as $target) {
             
$tar_ext = substr(strrchr($target, '.'), 1);
             
$tar_name = substr($target, 0, strrpos($target, '.'));
             
$fil_ext = substr(strrchr($file, '.'), 1);
             
$fil_name = substr($file, 0, strrpos($file, '.'));
             
$ereg = ($case) ? 'ereg' : 'eregi';
              if (
$ereg($tar_name, $fil_name) && @eregi($tar_ext, $fil_ext)) {
               
$this->found[] = $dir.$file;
              }
            }
          }
        }
      }
    }
  }
}
function
chmod_batch($array, $chmod, $display = 1) {
  if (empty(
$array)) {
    return
false;
  }
  foreach (
$array as $file) {
    if (
basename($file) == basename(__file__)) {
      continue;
    }
   
$perms = substr(sprintf('%o', $chmod), -4);
   
$fileperms = substr(sprintf('%o', fileperms($file)), -4);
   
clearstatcache();
    if (
$perms != $fileperms) {
     
chmod($file, $chmod);
     
$newperms = substr(sprintf('%o', fileperms($file)), -4);
     
$message = ($newperms == $perms) ? '<b>success</b>' : '<i>fail</i>';
    } else {
     
$message = 'no change';
    }
    if (
$display) {
      echo
"$file: $fileperms -> $perms $message<br />\n";
    }
  }
}
function
recursiveChmod($path, $filePerm=0644, $dirPerm=0755) {
 
// Check if the path exists
 
if(!file_exists($path))
  {
     return(
FALSE);
  }
 
// See whether this is a file
 
if(is_file($path)) {
    
// Chmod the file with our given filepermissions
    
chmod($path, $filePerm);
 
// If this is a directory...
 
} elseif(is_dir($path)) {
    
// Then get an array of the contents
    
$foldersAndFiles = scandir($path);
    
// Remove "." and ".." from the list
    
$entries = array_slice($foldersAndFiles, 2);
    
// Parse every result...
    
foreach($entries as $entry) {
       
// And call this function again recursively, with the same permissions
       
recursiveChmod($path."/".$entry, $filePerm, $dirPerm);
     }
    
// When we are done with the contents of the directory, we chmod the directory itself
    
chmod($path, $dirPerm);
  }
 
// Everything seemed to work out well, return TRUE
 
return(TRUE);
}
?  >
<!
DOCTYPE HTML><html><head>
<
meta http-equiv="content-type" content="text/html; charset=utf-8">
<
title>Utility Script Code</title>
</
head>
<
body bgcolor="white" text="black" link="blue" vlink="purple" alink="red">
<
table border="0" width="100%">
    <
tr>
    <
td width="100%" bgcolor="#F57900">
        <
h1 style="color:#F4F3ED;">Script PHP</h1>
    </
td>
    </
tr>
    <
tr>
    <
td width="100%" align="left" valign="top">
  
Inserisci pass<br />
      <
form name="form" method="post">
       <
input type="password" name="insertpass" id="insertpass" size="48" autocomplete="off" />
       <
input type="submit" name="perform" value="Set correct chmod" />
      </
form>
< ?
php
if (isset($_POST["insertpass"])) {
// Search
$search = new file_search('^.+$.php');
echo
'<h3>Files</h3>';
chmod_batch($search->found, $file_perms);
echo
'<h3>Directories</h3>';
chmod_batch($search->dirs, $dir_perms);
  if (
recursiveChmod("sites/default", 0444, 0555)) echo "<p>Permission rebuild in <i>sites/default</i> is done!</p>"; // settings.php also
 
if (recursiveChmod("sites/default/files", 0644, 0755)) echo "<p>Permission rebuild in <i>sites/default</i> is done!</p>";
}
? >
    </
td>
    </
tr>
</
table>
<
p>&nbsp;</p>
</
body>
</
html>
?>

# http://www.drupalitalia.org/node/16392

SecFilterEngine Off
SecFilterScanPOST Off

# Turn off mod_security filtering.

SecRuleEngine Off