
- You are not logged in. | Login
January 16, 2007 1:07 pm
- n00bphp
- Member


Can't change the acces rights
Can't change the acces rights
<?php
require_once ("config.php");
if (ftp_chmod ($connect, 0755, "/logs")) echo "Permissions have been changed.";
else echo "Failed to change the permissions";
?>Error:
Warning: ftp_chmod() [function.ftp-chmod]: Could not change perms on /logs in D:\data\index.php on
January 16, 2007 1:10 pm
- phppat
- Member


Re: Can't change the acces rights
are you connected to the ftp server?
ps
// attempt to change permissions to $file to 644
if (ftp_chmod($conn_id, 0644, $file) !== false) {
echo "Permissions to the $file have been changed to 644\n";
} else {
echo "Couldn't change permissions to the $file\n";
}PHP monster
January 16, 2007 1:12 pm
- phppat
- Member


Re: Can't change the acces rights
What are you changing the permissions to? To the ligs folder in the root?
PHP monster
January 16, 2007 1:12 pm
- n00bphp
- Member


Re: Can't change the acces rights
I tried to change them to all files and folders but nothing happens
January 16, 2007 1:15 pm
- mmwfan
- Member


Re: Can't change the acces rights
Try to use the following function:
ftp_raw($conn_id, "chmod 755 /logs");
January 16, 2007 1:16 pm
- n00bphp
- Member


Re: Can't change the acces rights
Thank you. I got
require_once ("config.php");
if (ftp_raw($connect, "chmod 755 /logs")) echo "Permissions have been changed.";
else echo "Failed to change the permissions";


