Re: Changing to a windows mounted share from a Mac OS X machine
This WebDNA talk-list message is from 2002
It keeps the original formatting.
numero = 40775
interpreted = N
texte = Dale, the folderdate variable will not be passed into the shell script,you will need to run them allinside the shell script, create in include or something similar.[shell]su dalecd /Volumes/g3071/dailyecho directory changed to:pwdmkdir [folderdate]echo [folderdate] - value of folderdateecho directory createdls -al[/shell]you may even need to add sudo to the start of each line ..sudo cd / ...sudo mkdiretcAlain> This is getting really frustrating!>> What works:> Downloading files, parsing the info I need from the file which gives me> the data I need for the name of the folder I need to create.>> What doesn't work - passing the new folder name info to a shell script> so the script can create the folder.>> Here is the webcat piece (the variable is already defined)>
> [shell]> sudo /Users/dale/Sites/iboxx/scripts/iboxx.sh> echo got here> [/shell]>
>> Here is the contents of the script>> --- begin script ---> #!/bin/sh> su dale> cd /Volumes/g3071/daily> echo directory changed to:> pwd> mkdir [folderdate]> echo [folderdate] - value of folderdate> echo directory created> ls -al>> echo script completed>> --- end script --->>> While it seems webcat will pass a variable to the shell, it doesn't> pass it to a shell script (kind of makes sense). But now, how do I get> this information ( [folderdate] ) to the script in order to make the> new directory I need?>> Or, failing the ability to pass the variable to the script, does anyone> know how to read in a text file under bash and assign it to a variable> there?>> I could do a [writefile] with the new foldername with webcat and then> have something in the bash scrip read it and use that to make the new> directory.>> Thanks>> Dale>>>> on 21/6/02 2:06 pm, Alain Russell at alain.russell@blackpepper.co.nz> wrote:>>> The line you will need to add is>>>> www
ALL=NOPASSWD:/bin/ls>>>> This will allow you to run 'ls' as user root when you are logged in as>> user www (the webcatuser) without asking for a password ..>>>> you need to use visudo to edit the sudoers file.>> HTH .. Alain>>>>>>> Alain,>>>>>> Thanks for the reply.>>>>>> What is strange is that I can make any changes using the gui, but not>>> from the shell. So I do believe I need to use sudo (as you suggested)>>> but what is the proper syntax to enter a line in the sudoers file so>>> that I am not prompted for a password?>>>>>> Thanks>>>>>> Dale>>>>>> on 20/6/02 11:00 am, Alain Russell at alain.russell@blackpepper.co.nz>>> wrote:>>>>>>> Dale,>>>> If you try and access the share with the command line can you list>>>> the files ??to see if you are having a permissions error type>>>>>>>> cd /Volumes/g3071/>>>> sudo -u www ls -l>>>> enter password if asked>>>>>>>> and see if the files list - this would be that same response WebCat>>>> gets ..>>>>>>>> Alain>>>>>>>>> Hello,>>>>>>>>>> I have a project I am working on where I download some files to a>>>>> Mac OS X machine, do a little bit of processing and then have to>>>>> copy the files to a specified folder on a Windows share.>>>>>>>>>> If I do:>>>>>>>>>> [shell]>>>>> cd /Volumes/>>>>> ls -al>>>>> [/shell]>>>>>>>>>> I see the mounted shares as g3071 and g3071%2fbox where the second>>>>> one is actually a folder on the g3071 share, and is the one I need.>>>>> The second one shows up on my desktop simply as box>>>>>>>>>> However, if I try>>>>>>>>>> [shell]>>>>> cd /Volumes/g3071/>>>>> ls>>>>> [/shell]>>>>>>>>>> I get a directory listing of the folder the template is in. Same if>>>>> I try the second entry.>>>>>>>>>> I am using DAVE 3.1.1 to mount the windows shares. I can access the>>>>> shares fine from the desktop.>>>>>>>>>> Not being able to move these files to this share is really annoying>>>>> and preventing this project from being completed. Anyone have any>>>>> ideas?>>>>>>>>>> I can't ftp to this box as ftp is not enabled and the admins will>>>>> not enable it, or make any other changes to the box.>>>>>>>>>> Thanks>>>>>>>>>> Dale>>>>>>>>>>>>>>>>>>> ------------------------------------------------------------->>> This message is sent to you because you are subscribed to>>> the mailing list .>>> To unsubscribe, E-mail to: To>>> switch to the DIGEST mode, E-mail to>>> Web Archive of this list is>>> at: http://search.smithmicro.com/>>>>> -------------------------------------------------------------> This message is sent to you because you are subscribed to> the mailing list .> To unsubscribe, E-mail to: > To switch to the DIGEST mode, E-mail to> Web Archive of this list is> at: http://search.smithmicro.com/-- Alain RussellBlackpepper Interactivealain.russell@blackpepper.co.nzph. 09 520 6280-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/
Associated Messages, from the most recent to the oldest:
Dale, the folderdate variable will not be passed into the shell script,you will need to run them allinside the shell script, create in include or something similar.[shell]su dalecd /Volumes/g3071/dailyecho directory changed to:pwdmkdir [folderdate]echo [folderdate] - value of folderdateecho directory createdls -al[/shell]you may even need to add sudo to the start of each line ..sudo cd / ...sudo mkdiretcAlain> This is getting really frustrating!>> What works:> Downloading files, parsing the info I need from the file which gives me> the data I need for the name of the folder I need to create.>> What doesn't work - passing the new folder name info to a shell script> so the script can create the folder.>> Here is the webcat piece (the variable is already defined)> > [shell]> sudo /Users/dale/Sites/iboxx/scripts/iboxx.sh> echo got here> [/shell]>
>> Here is the contents of the script>> --- begin script ---> #!/bin/sh> su dale> cd /Volumes/g3071/daily> echo directory changed to:> pwd> mkdir [folderdate]> echo [folderdate] - value of folderdate> echo directory created> ls -al>> echo script completed>> --- end script --->>> While it seems webcat will pass a variable to the shell, it doesn't> pass it to a shell script (kind of makes sense). But now, how do I get> this information ( [folderdate] ) to the script in order to make the> new directory I need?>> Or, failing the ability to pass the variable to the script, does anyone> know how to read in a text file under bash and assign it to a variable> there?>> I could do a [writefile] with the new foldername with webcat and then> have something in the bash scrip read it and use that to make the new> directory.>> Thanks>> Dale>>>> on 21/6/02 2:06 pm, Alain Russell at alain.russell@blackpepper.co.nz> wrote:>>> The line you will need to add is>>>> wwwALL=NOPASSWD:/bin/ls>>>> This will allow you to run 'ls' as user root when you are logged in as>> user www (the webcatuser) without asking for a password ..>>>> you need to use visudo to edit the sudoers file.>> HTH .. Alain>>>>>>> Alain,>>>>>> Thanks for the reply.>>>>>> What is strange is that I can make any changes using the gui, but not>>> from the shell. So I do believe I need to use sudo (as you suggested)>>> but what is the proper syntax to enter a line in the sudoers file so>>> that I am not prompted for a password?>>>>>> Thanks>>>>>> Dale>>>>>> on 20/6/02 11:00 am, Alain Russell at alain.russell@blackpepper.co.nz>>> wrote:>>>>>>> Dale,>>>> If you try and access the share with the command line can you list>>>> the files ??to see if you are having a permissions error type>>>>>>>> cd /Volumes/g3071/>>>> sudo -u www ls -l>>>> enter password if asked>>>>>>>> and see if the files list - this would be that same response WebCat>>>> gets ..>>>>>>>> Alain>>>>>>>>> Hello,>>>>>>>>>> I have a project I am working on where I download some files to a>>>>> Mac OS X machine, do a little bit of processing and then have to>>>>> copy the files to a specified folder on a Windows share.>>>>>>>>>> If I do:>>>>>>>>>> [shell]>>>>> cd /Volumes/>>>>> ls -al>>>>> [/shell]>>>>>>>>>> I see the mounted shares as g3071 and g3071%2fbox where the second>>>>> one is actually a folder on the g3071 share, and is the one I need.>>>>> The second one shows up on my desktop simply as box>>>>>>>>>> However, if I try>>>>>>>>>> [shell]>>>>> cd /Volumes/g3071/>>>>> ls>>>>> [/shell]>>>>>>>>>> I get a directory listing of the folder the template is in. Same if>>>>> I try the second entry.>>>>>>>>>> I am using DAVE 3.1.1 to mount the windows shares. I can access the>>>>> shares fine from the desktop.>>>>>>>>>> Not being able to move these files to this share is really annoying>>>>> and preventing this project from being completed. Anyone have any>>>>> ideas?>>>>>>>>>> I can't ftp to this box as ftp is not enabled and the admins will>>>>> not enable it, or make any other changes to the box.>>>>>>>>>> Thanks>>>>>>>>>> Dale>>>>>>>>>>>>>>>>>>> ------------------------------------------------------------->>> This message is sent to you because you are subscribed to>>> the mailing list .>>> To unsubscribe, E-mail to: To>>> switch to the DIGEST mode, E-mail to>>> Web Archive of this list is>>> at: http://search.smithmicro.com/>>>>> -------------------------------------------------------------> This message is sent to you because you are subscribed to> the mailing list .> To unsubscribe, E-mail to: > To switch to the DIGEST mode, E-mail to> Web Archive of this list is> at: http://search.smithmicro.com/-- Alain RussellBlackpepper Interactivealain.russell@blackpepper.co.nzph. 09 520 6280-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/
Alain Russell
DOWNLOAD WEBDNA NOW!
Top Articles:
Talk List
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...
Related Readings:
select multiple (1997)
WebCat2b12plugin - [search] is broken ... not! (1997)
SSL and WebCatalog (1997)
Multiple Pulldowns (1997)
Images (2000)
emailer (1997)
[WebDNA] limit found per row (2011)
PSC recommends what date format yr 2000??? (1997)
[lottaCopy] through SSL (1998)
refreshing IE with posted .tmpl (1997)
multiple search commands (1997)
Test (2001)
WebSTAR and WebSTAR/SSL with WebCatalog plugins (1998)
[OT]Co-Location of a Server (2002)
About WebCatalog and iTools 7 (2003)
spawn (1998)
Group search doesn't work. (1997)
writing orders to a db (1997)
Not really WebCat (1997)
Only charge card when product shipped ? (1997)