Avatar of Rowby Goren
Rowby GorenFlag for United States of America

asked on 

Clarifying a simple telnet/ssh script

Hi  

I don't do shh much :).   Today I got some instructions to do a command to adjust permissions.  Below is their instructions, with some key directories changed for obvious  privacy and security reasons.

Here is how you can reset the ownership of files created by apache, so you can delete them.

ssh to the server and

$ sudo blahblah-bananas.sh <path>

where <path> will be:

/www/foobar/docroot/oranges OR, (for everything)

This script makes EVERY file writeable by both human and machine 

Open in new window


When I telnet/ssh in I see a screen that already starts with the $ sign. (Specifically

[rowby@foobar ~]$ 

Open in new window

 Do I repeat that $ sign?

And do I put a space before the /www/foobar/docroot/oranges OR

In other words, can someone give me the EXACT command, including the path, to type into the dialog box in order to get it to work.

I hope I have given you enough info!

Thanks
SSH / Telnet Software

Avatar of undefined
Last Comment
Rowby Goren
Avatar of farzanj
farzanj
Flag of Canada image

$ means prompt --Don't put it again.

 You do ssh <ADDRESS> to logon to the server

Then you are on the remote machine.  You run a script using sudo, which gives you authority to run as a root -- super user.
Avatar of farzanj
farzanj
Flag of Canada image

>> And do I put a space before the /www/foobar/docroot/oranges OR
You mean before /www?

Does not matter at all.

What are you trying to make executable.

Could you should me output of command

cat  /www/foobar/docroot/oranges
ASKER CERTIFIED SOLUTION
Avatar of farzanj
farzanj
Flag of Canada image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of Rowby Goren
Rowby Goren
Flag of United States of America image

ASKER

Thanks farzanj

Here's a screen shot of how far I have gone so far.  

Getting "command not found" User generated image
Avatar of farzanj
farzanj
Flag of Canada image

I don't think you should do "OR" at the end of lines

Did you do ssh before running commands?

It is simply saying that the shell script doesn't exist.  may be you are not on the correct directory.
Avatar of Rowby Goren
Rowby Goren
Flag of United States of America image

ASKER

Hi

I got rid of the "OR".

Did you do ssh before running commands?
I am logging in using Bitvise, under the SSH tab.  

It is simply saying that the shell script doesn't exist.  may be you are not on the correct directory.
I assumed I was in the correct directory to do the command, based on the person's instructions to me (see the initial question I posted. )   When you log iin va ssh do you usually start in the document root?  
 
Would blahblah-bananas.sh  be a script (with that sh extension) that the person would have put in that folder?  Perhaps you are right and it is not in the folder I initially sshed into.  Maybe he put it in the document root????

In case the sh script is in the document root, can you tell me the command to get to the document root?

Here is my latest screen shot.

 User generated image
Avatar of farzanj
farzanj
Flag of Canada image

When you do

cd


If you are talking about docroot,

you need cd /wwHIDDEN IN YOUR MESSAGE/docroot

you go to the root of a particular user.

you can issue this command

locate <scriptName>

to find the script.  Then you should issue command like

sudo /path/script/name /SOMETHING/docroot/

If locate doesn't work, issue this command

find /www -type f -iname 'script.sh'
Avatar of Rowby Goren
Rowby Goren
Flag of United States of America image

ASKER

Also you might try using this editor:

http://extensions.joomla.org/extensions/edition/editors/90

It's a quick install.  

Avatar of Rowby Goren
Rowby Goren
Flag of United States of America image

ASKER

Sorry for that previous post -- I meant it for a different experts exchange response to a question!

Avatar of Rowby Goren
Rowby Goren
Flag of United States of America image

ASKER

Thanks for your help.  I contacted tech support an the command was not in the directory.  They put it in, and I ran your version of the command and it did he permission change.

I appreciate you help!

Rowby
SSH / Telnet Software
SSH / Telnet Software

Telnet is an application layer protocol used on the Internet or local area networks to provide a bidirectional interactive text-oriented communication facility using a virtual terminal connection. SSH was designed as a replacement for Telnet and for unsecured remote shell protocols. The term telnet is also used to refer to the software that implements the client part of the protocol. SSH provides a secure channel over an unsecured network in a client-server architecture, connecting an SSH client application with an SSH server.

2K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo