How can I fix "Permission Denied" on ftp_put () in php?

I get permission to reject messages when I try to upload a file:

Warning: ftp_put() [function.ftp-put]: Can't open that file: Permission denied in /home/kirby/public_html/members/upload_advanced.php on line 48

The file already exists, how to enable ftp_put () to overwrite it.

In addition, here is the download code:

$upload = ftp_put($conn_id, "www/logos/web_".$row[username].".jpg",
                                  "../logos/web_" . $row[username] . ".jpg",  FTP_BINARY);
+3
source share
1 answer

To enable write access, you need to edit the file /etc/vsftpd.conf and uncomment

#write_enable=YES

therefore he must read

write_enable=YES

Save the file and restart vsftpd with sudo service vsftpd restart. https://askubuntu.com/a/410962

+1
source

All Articles