|
Home > Archive > Unix Shell > February 2007 > .ssh directory permission denied
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
.ssh directory permission denied
|
|
| Schubert 2007-02-21, 1:18 pm |
| When I spawn $HOME/.ssh, an error message shows:
---------------------------------------------------------------------------------
couldn't execute "/cygdrive/d/$HOME/.ssh": permission denied
while executing
"spawn /cygdrive/d/$HOME/.ssh "
(file "****.exp" line 27)
-------------------------------------------------------------------------------------
I am using Cygwin to run the expect script, but i got this error
message.
The script is supposed to automatically remove a file under the
directory .ssh.
I have tried using chmod 755 .ssh to change the permission, but not
useful.
What should I do if I want to delete a file under .ssh in Expect
script? Can I use the following code to do this?
---------------------------------------------------------------------------------------
spawn /cygdrive/d/$HOME/.ssh
if {[file exists /cygdrive/d/$HOME/.ssh/$file]==1} {
exec rm /cygdrive/d/$HOME/.ssh/$file
}
------------------------------------------------------------------------------------------
I have tried this script under Solaris, it works, but it does not work
in Cygwin due to the permission problem.
| |
| Bill Marcum 2007-02-21, 1:18 pm |
| On 21 Feb 2007 07:04:53 -0800, Schubert
<cxbest2004@yahoo.com> wrote:
>
>
> When I spawn $HOME/.ssh, an error message shows:
> ---------------------------------------------------------------------------------
> couldn't execute "/cygdrive/d/$HOME/.ssh": permission denied
> while executing
> "spawn /cygdrive/d/$HOME/.ssh "
> (file "****.exp" line 27)
> -------------------------------------------------------------------------------------
> I am using Cygwin to run the expect script, but i got this error
> message.
> The script is supposed to automatically remove a file under the
> directory .ssh.
> I have tried using chmod 755 .ssh to change the permission, but not
> useful.
>
> What should I do if I want to delete a file under .ssh in Expect
> script? Can I use the following code to do this?
> ---------------------------------------------------------------------------------------
> spawn /cygdrive/d/$HOME/.ssh
>
Why are you trying to execute a directory?
--
A celebrity is a person who is known for his well-knownness.
| |
| Will Renkel 2007-02-22, 1:18 pm |
| under cygwin you are subjected to Windows rules
which are (I believe) that you CANNOT remove a file which is in use.
You can in Solaris and real UNIX
I found out the hard way as well
cxbest2004@yahoo.com wrote:
>When I spawn $HOME/.ssh, an error message shows:
>---------------------------------------------------------------------------------
>couldn't execute "/cygdrive/d/$HOME/.ssh": permission denied
> while executing
>"spawn /cygdrive/d/$HOME/.ssh "
> (file "****.exp" line 27)
>-------------------------------------------------------------------------------------
>I am using Cygwin to run the expect script, but i got this error
>message.
>The script is supposed to automatically remove a file under the
>directory .ssh.
>I have tried using chmod 755 .ssh to change the permission, but not
>useful.
>
>What should I do if I want to delete a file under .ssh in Expect
>script? Can I use the following code to do this?
>---------------------------------------------------------------------------------------
> spawn /cygdrive/d/$HOME/.ssh
>
> if {[file exists /cygdrive/d/$HOME/.ssh/$file]==1} {
>
> exec rm /cygdrive/d/$HOME/.ssh/$file
>
> }
>
>------------------------------------------------------------------------------------------
>I have tried this script under Solaris, it works, but it does not work
>in Cygwin due to the permission problem.
>
--
---------------------------------------------------------------
Will Renkel
Wheaton, Ill.
REGISTERD Linux User: 300583
---------------------------------------------------------------
|
|
|
|
|