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 = 40768
interpreted = N
texte = 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.shecho 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 -alecho 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.ThanksDaleon 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/ Associated Messages, from the most recent to the oldest:

    
  1. Re: Changing to a windows mounted share from a Mac OS X machine (Alain Russell 2002)
  2. Re: Changing to a windows mounted share from a Mac OS X machine (drt - lists 2002)
  3. Re: Changing to a windows mounted share from a Mac OS X machine (dale 2002)
  4. Re: Changing to a windows mounted share from a Mac OS X machine (Alain Russell 2002)
  5. Re: Changing to a windows mounted share from a Mac OS X machine (drt - lists 2002)
  6. Re: Changing to a windows mounted share from a Mac OS X machine (Alain Russell 2002)
  7. Changing to a windows mounted share from a Mac OS X machine (drt - lists 2002)
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.shecho 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 -alecho 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.ThanksDaleon 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/ drt - lists

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:

where to put code (1998) [OT], Sorta: WebCat-Talk List (2000) Form Variables (2000) Not really WebCat (1997) authenticating a second user, the sequel (1997) WebCat2 several catalogs? (1997) [WebDNA] No more SQL in 7.1? (2012) Old code new problem? (2004) would this be a good use of [spawn]? (2002) WebCat2: multiple currency support (1997) [WebDNA] Successful, working WebDNA7/CentOS install? (2013) Help (1999) upload pictures any solution (1999) NT or Mac (1997) Sitebuilder (2004) Sending E-mail (1997) Protect and Serve (1999) range searching (1998) Fwd: HTML encoding in URLs (1997) WebMerchant (1997)