aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_transfer.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2007-06-19 13:05:53 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2007-06-19 13:05:53 +0000
commit22b970ef1e5675b7e74e6a2505c9fede44ed453c (patch)
treef540dd713079291352f6035026c03ebcb870def2 /phpBB/includes/functions_transfer.php
parentf175509f71c14071d76a22bb033ccc39950ab827 (diff)
downloadforums-22b970ef1e5675b7e74e6a2505c9fede44ed453c.tar
forums-22b970ef1e5675b7e74e6a2505c9fede44ed453c.tar.gz
forums-22b970ef1e5675b7e74e6a2505c9fede44ed453c.tar.bz2
forums-22b970ef1e5675b7e74e6a2505c9fede44ed453c.tar.xz
forums-22b970ef1e5675b7e74e6a2505c9fede44ed453c.zip
Fix permission issue with the transfer class if using PHP4 or for those not having the ftp extension available
git-svn-id: file:///svn/phpbb/trunk@7782 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions_transfer.php')
-rw-r--r--phpBB/includes/functions_transfer.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/phpBB/includes/functions_transfer.php b/phpBB/includes/functions_transfer.php
index 51a7fa8bb7..2a38c8c7ad 100644
--- a/phpBB/includes/functions_transfer.php
+++ b/phpBB/includes/functions_transfer.php
@@ -382,7 +382,9 @@ class ftp extends transfer
}
else
{
- $chmod_cmd = 'CHMOD ' . $perms . ' ' . $file;
+ // Unfortunatly CHMOD is not expecting an octal value...
+ // We need to transform the integer (which was an octal) to an octal representation (to get the int) and then pass as is. ;)
+ $chmod_cmd = 'CHMOD ' . base_convert($perms, 10, 8) . ' ' . $file;
$err = $this->_site($chmod_cmd);
}
@@ -605,7 +607,9 @@ class ftp_fsock extends transfer
*/
function _chmod($file, $perms)
{
- return $this->_send_command('SITE CHMOD', $perms . ' ' . $file);
+ // Unfortunatly CHMOD is not expecting an octal value...
+ // We need to transform the integer (which was an octal) to an octal representation (to get the int) and then pass as is. ;)
+ return $this->_send_command('SITE CHMOD', base_convert($perms, 10, 8) . ' ' . $file);
}
/**