Copy files between servers - Solved

Jim Ault jimaultwins at yahoo.com
Fri May 15 10:41:06 EDT 2009


Solved for my situation

-1- For the Win 2003 C:/temp/_outputFiles/  folder, set the security  
to this user (Rev) as Full Control
-2-
put logText into url ("File:" & "C:/temp/_outputFiles/" & filename &  
".txt")
get shell("chmod 644" && ("C:/temp/_outputFiles/" & filename & ".txt"))

  On the OSX machine that has mounted the temp/ folder as a shared  
folder
-3-
set the defaultfolder to "/Volumes/temp/_outputFiles/"
put the files into fileList
filter fileList without ".*"
repeat for each line LNN in fileList
    put "/Volumes/temp/_outputFiles/" & LNN into sorce
    put "/Users/username/Sites/_outputFiles/" & LNN into dest
    put url ("file:" & sorce) into url ("file:"& dest)
    get shell("chmod 644" && dest)
    delete file sorce -- purge since these are not appended-style  
output files
end repeat

Now apache can read the file.
Actually, I am writing the log files as html formatted, so my  
extension is .html instead of .txt

Later I will add some php and thus I want to allow execution, so
get shell("chmod 777" && destPhpFile)

I am happy that this works well and does the job quickly.

Jim Ault
Las Vegas


On May 14, 2009, at 11:11 AM, Bernard Devlin wrote:

> I think the umask environment variable is what you need on the Unix
> side of things.
>
> http://www.tech-faq.com/umask.shtml
>
> Although since the mounted folder is actually a smb/cifs share, there
> may be other issues that complicate things.  You may need to work with
> the Windows permissions instead/as well.
>
> Bernard
>
> On Thu, May 14, 2009 at 5:58 PM, Jim Ault <jimaultwins at yahoo.com>  
> wrote:
>> Basic setup is
>> Rev stack running a send loop in Win 2003 Server
>> -1- a text file is written to the C:/temp/    folder
>>
>> Rev stack running a send loop in OSX 10.5 Leopard
>> -2- the  C:/temp/  folder is mounted as a shared drive
>> thus has the path /Volumes/temp/  in the OSX Finder
>>
>> Apache in OSX is serving pages in the /Users/username/Sites/  folder
>> The Rev stack in OSX can do RevCopy to the Sites/ folder
>>
>> however, the permissions are set to 700  vs 644 and Apache cannot  
>> read them.
>> (note: the files to be 'copied' do not have the same file name  
>> since they
>> are time stamped file names)
>>
>> To do a shell("chmod") I think I will have to do SUDO, but since  
>> this is a
>> continuous process, how would I handle the password?
>>
>> I know that 'root' user is dangerous, and 'www' maybe as well.
>>
>> Instead of using RevCopy,
>> Is there a way of setting the Apache permissions on the mounted
>> C:/temp/theseFilesOnly/ folder?
>> I don't know how to specify the mounted/shared drive for Apache.
>>
>> Any tips or help would be appreciated.
>>
>> PS.  For the files that are always named the same,
>> put url ("file:" & pathToSitesFolder & "filename.txt") works fine  
>> since the
>> permissions have been set to 644.
>> It is just the new filenames on C:/temp/  that the permissions need  
>> to be
>> changed.
>>
>> Jim Ault
>> Las Vegas
>> _______________________________________________
>> use-revolution mailing list
>> use-revolution at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your  
>> subscription
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-revolution
>>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your  
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution

Jim Ault
jimaultwins at yahoo.com






More information about the use-livecode mailing list