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:
Emailer port change (1997)
Duplicate Cart Problem in Netscape (2000)
WebCat2b12 CGI Mac - [shownext] problem (1997)
[WebDNA] jumping on the linux train (2011)
Big Databases (1997)
Setting user/password with a form. (2000)
Country & Ship-to address & other fields ? (1997)
[searchString] (1997)
Where's Cart Created ? (1997)
[Search] on Remote Database (2000)
HELLO (2000)
Database field limit? (1998)
WebCat2b14MacPlugIn - [include] doesn't hide the search string (1997)
Electronic Delivery (1997)
Hiccup ***** (1998)
No incentive ... (2000)
[WebDNA] Connect to MS SQL (2013)
Putting [cart] into a database (2003)
Date search bug (1998)
Parse question (2005)