[Semi-OT] FTP permissions problems
sarah.reichelt at gmail.com
Tue Jun 17 00:31:59 CDT 2008
> I have several Rev applications that use the FTP commands to create
> web pages & images and upload them via FTP to a web server. Now I am
> trying to change to running this web server internally on an OS X
> machine. I have enabled FTP access and set up the folders and the
> uploading is working perfectly. This is just using Mac OS X's standard
> File sharing via FTP. However when I try to connect using a web
> browser, I don't have permission to look at the files. When using
> exactly the same FTP commands on an external server, this was never a
> problem, so what is going on.
> The folder the files are going into is set to have the correct access
> (644), so if I go to the folder and manually apply the permission to
> the enclosed items, it all works, however this is not a workable
> solution as there will be new files every now & then.
Solved the problem. I was putting quotes around the file names in the
FTP command but that didn't work.
Now I use CWD to get to the correct folder on the FTP server, then do:
put "SITE CHMOD 640" && tFileName into tCmd
put libURLftpCommand(tCmd, tServer, tUser, tPass) into tRes
if word 1 of tRes <> "200" then
put "Error" into fld "Status"
-- handle the error
BTW, my solution was found using Fetch. It can show the FTP transcript
with all communications to & from the FTP server, so I used it to set
some permissions and watched exactly what it did.
More information about the use-livecode