Page 1 of 1

ftp, set file permissions

Posted: Mon Apr 15, 2024 1:37 am
by jassing
is there a way to set (via FTP) a file's permissions (ie: 0644)

Re: ftp, set file permissions

Posted: Mon Apr 15, 2024 2:11 am
by Quin
Doesn't seem so. You can get the attributes with FTPDirectoryEntryAttributes(), but not set them. Yet another enhancement we can hope for when the FTP lib gets updated.
There's a request about it from 2008 :o https://www.purebasic.fr/english/viewtopic.php?p=254202

Re: ftp, set file permissions

Posted: Mon Apr 15, 2024 2:20 am
by jassing
Thanks Quin... If there's a request from 16 years ago, I don't think I'll hold on to hope.

Re: ftp, set file permissions

Posted: Mon Apr 15, 2024 7:14 am
by infratec
You can use my libcurl.pbi and use #CURLOPT_QUOTE with "chmod 644 file"

https://curl.se/libcurl/c/CURLOPT_QUOTE.html

Re: ftp, set file permissions

Posted: Mon Apr 15, 2024 11:43 am
by jassing
Thanks! I'll have a go with that.
cheers!