when i connect remotely to digital ocean server by doing ssh deploy#dropletIP i type pwd this comes out
/home/deploy
when i type "ls" nothing show up
when I do cd shared it says
-bash: cd: shared: No such file or directory
when i type .. or cd - or /
No command 'cd-' found, did you mean:
..: command not found
-bash: /: Is a directory
Im trying to navigate to shared/config so i can create database.yml and secrets.yml
cause you logged in to ur remote server as SFTP, that will make u go to different directory than logging in as SSH
Related
I am trying to execute the below docker command where I am trying to get the 'Orthanc.json" file to my system folder which is "orthanc".
docker run --rm --entrypoint=cat jodogne/orthanc /etc/orthanc/orthanc.json >
orthanc/orthanc.json
under /etc/orthanc/orthanc.json - It is a directory and not a file - Am not able to use vim editor to read/open the file. - This is a public one. Anyone can access using this link Orthanc link
I get the below error message, Can you please help me understand what is the issue?
-bash: /orthanc/orthanc.json: Is a directory
orthanc.json should be a file but why does it treat it as a directory?
when I use vim orthanc.json, it throws an error message that it's a directory.
What should I be doing to see this as a config file as I have to make changes to it?
You've somehow already got a directory named /orthanc/orthanc.json on your host system. Remove it and try again.
rmdir /orthanc/orthanc.json # if empty
rm -rf /orthanc/orthanc.json # if not empty -- but see what's in there first!
I am trying to transfer all .sh files from one unix server to another using jenkins.
Files are getting transfer but it is coming in my unix home directory, I need to transfer it sudo user directory.
for example:
Source server name is "a" and target server name is "u"
we are using sell4 as sudo user in target server name
it should come in home directory of sell4 user
I have used the below command
Building in workspace /var/lib/jenkins/workspace/EDB-ExtractFilefromSVN
SSH: Connecting from host [a]
SSH: Connecting with configuration [u] ...
SSH: EXEC: STDOUT/STDERR from command [sudo scp *.sh sell4#u:/usr/app/TomcatDomain/ScoringTools_ACCDomain04/] ...
sudo: scp: command not found
SSH: EXEC: completed after 201 ms
SSH: Disconnecting configuration [u] ...
ERROR: Exception when publishing, exception message [Exec exit status not zero. Status [1]]
Gitcolony notification failed - java.lang.IllegalArgumentException: Invalid url:
Finished: UNSTABLE
Can you please suggest what I am going wrong here?
EDITS:
Adding the shell screenshot:
ah so it's some kind of plugin. It seems like you want to run local sudo to login to remote server user. It won't work this way. You can't open door to bathroom and expect walking into a garden.
sudo changes your local user to root, not remote server.
Do not use sudo with scp command but rather follow these answers:
https://unix.stackexchange.com/questions/66021/changing-user-while-scp
I'm getting error when sending notification using rpush gem after deploying on linux server while all notification data is saved into table.
On my local i was pushing notification by rpush push command but on linux this command is not found so please help me to sort out this problem.
rpush is not being found in your path (an environment variable which contains the file paths for all executable files). You can confirm this with the which command.
which rpush
The fact it returns nothing tells you it is not in your path. If it was in your path it will return the file path of the executable file that runs when you enter the command into the terminal.
Prior to adding it to your path, just check it is actually installed.
You can add it to the path by opening ~/.profile or ~/.bash_profile or ~/.bashrc (where the squiggle ~ is your home directory) and entering:
export PATH=$PATH:/path/to/rpush/executable
Then reload your terminal or type source ~/.profile for example.
For some documentation on paths there is the Linux Info site, and for Bash profiles you can check out this page.
I've saved 'hello world' as a .rb file on my computer running Mac OS X Lion. I'm trying to create a new directory called ruby_tutorials in the root of my file system, but I'm having some trouble.
I tried typing in the command mkdir /ruby_tutorials in a terminal, but I got this error message: 'Permission Denied'. How can I overcome this?
Try this:
sudo mkdir /ruby_tutorials
sudo allows you to execute commands as a superuser. You need administrative privileges to create a directory in your root directory. One reason to use sudo for individual commands instead of always having administrative privileges is that it protects you from accidentally harming your system.
I am trying to restart a daemon called site_checker.rb using SSH commands through PuTTY. This file is located in:
/home/MYUSERNAME/web/current/lib/daemons
After logging into my website, which is built with Ruby on Rails, I see the following on-screen:
[MYUSERNAME#MYUSERNAME ~]$
From here, I enter
[MYUSERNAME#MYUSERNAME ~]$ cd web
and then
[MYUSERNAME#MYUSERNAME ~/web]$ script/daemons start
However, I get an error:
-bash: script/daemons: No such file or directory
You try to start /home/MYUSERNAME/web/lib/daemons while you claim your script is actually in /home/MYUSERNAME/web/current/lib/daemons. You are missing the current.