Unsolved
This post is more than 5 years old
1 Rookie
•
16 Posts
0
470
December 8th, 2014 12:00
Remotely checking for a directory exists or not
ssh gpadmin@XX.XXX.XXX.XXX "test -d $directory_name"
shell-init: error retrieving current directory: getcwd: cannot access parent directories: Permission denied
/ifs/is4/HDFS/xyz_uat/tmp/ exists
I am trying to execute a command on ISILON from a PHD admin node. I get this shell-init error. Is there any good way of checking the directories on ISILON from PHD cluster, we are trying to write a snapshot script for a given directory.
Any thoughts.
Thanks
0 events found
No Events found!


cadiletta
1 Rookie
•
106 Posts
0
December 9th, 2014 14:00
Great question! I don't have an answer but I wanted to add a couple questions here. I presume that for another target that offers SSH access, this method has been tested successfully? And the gpadmin account is able to manually connect over SSH and run commands in this directory, yes?
It doesn't appear that there is a problem with the command syntax or the command itself, but the error indicates this is specifically an access permission issue. So as a test, if you replaced gpadmin in this case with root, does this work? If so, then I wouldn't continue to use root - but rather I'd look further into the permissions gpadmin has in this folder and see if it can be adjusted to the level needed to run the command.