ftp, set file permissions

Just starting out? Need help? Post your questions and find answers here.
jassing
Addict
Addict
Posts: 1885
Joined: Wed Feb 17, 2010 12:00 am

ftp, set file permissions

Post by jassing »

is there a way to set (via FTP) a file's permissions (ie: 0644)
Quin
Addict
Addict
Posts: 1135
Joined: Thu Mar 31, 2022 7:03 pm
Location: Colorado, United States
Contact:

Re: ftp, set file permissions

Post 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
jassing
Addict
Addict
Posts: 1885
Joined: Wed Feb 17, 2010 12:00 am

Re: ftp, set file permissions

Post by jassing »

Thanks Quin... If there's a request from 16 years ago, I don't think I'll hold on to hope.
infratec
Always Here
Always Here
Posts: 7662
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: ftp, set file permissions

Post by infratec »

You can use my libcurl.pbi and use #CURLOPT_QUOTE with "chmod 644 file"

https://curl.se/libcurl/c/CURLOPT_QUOTE.html
jassing
Addict
Addict
Posts: 1885
Joined: Wed Feb 17, 2010 12:00 am

Re: ftp, set file permissions

Post by jassing »

Thanks! I'll have a go with that.
cheers!
Post Reply