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:

formulas.db ?? (1998) Missing something simple?? (1998) Using the new syntax/scoping methods (2000) [OT] Airport Network (2003) Fun with dates (1997) New WebCatalog Version !!! (1997) MacAuthorize Problem (1998) Why does this not work? (2002) WebCatalog2 Feature Feedback (1996) Multiple Pulldowns (1997) select multiple (1997) Off Topic: Frames Killer? (1998) Data Entry ... Excel Style ... How To? (2001) Multi-User Security on *nix using mod_rewrite (2002) case sensitivity in lookups (1997) Unexpected error (1997) Error Log.db --however (1997) unusual search problem (1998) Busted at the Border (1998) auto enter dates (1998)