Posts: 2
	Threads: 1
	Joined: Nov 2004
	
Reputation: 
0
	 
	
	
		
i only have access via telnet, how could i edit a text file?
i tried the ed command but i dont know how that works, i just get a number and then question-marks, i dont even know how to exit edlin.
 
thank you.
(what i am trying to do is, to edit the php.ini)
	
	
	
	
	
 
 
	
	
	
		
	Posts: 161
	Threads: 48
	Joined: Jan 2004
	
Reputation: 
0
	 
	
	
		to use your text editor telnet into the box with the file you wanna edit then type cd over to the directory the file is in and type vi filenamegoeshere  . once it brings up your file type i this will allow you to edit the file then when your done editing hit esc and type :wq
	
	
	
	
	
 
 
	
	
	
		
	Posts: 2
	Threads: 1
	Joined: Nov 2004
	
Reputation: 
0
	 
	
	
		
ur answer sounds very confusing to me, but this is what i did:
 
i copied it to a folder which i can access with my ftp.
i edited it and uploaded it again
now back in telnet, im trying to copy it where i got it from
 
these i belive are the paths:
 
/etc/php.ini    <- this is where i want to copy the edited one
/home/pblach/php.ini   <- this is my edited version in my folder.
 
im using this command but for some reason it doesnt work:
(beeing in the etc directory)
 
cp /home/pblach/php.ini /
cp /home/pblach/php.ini .
 
i tried both commands and they dont work, do i have a wrong syntax?
it says:
cp: cannot create reular file '/php.ini': Permission denied
 
 
thx
	
	
	
	
	
 
 
	
	
	
		
	Posts: 161
	Threads: 48
	Joined: Jan 2004
	
Reputation: 
0
	 
	
	
		
these i belive are the paths:
 
/etc/php.ini <- this is where i want to copy the edited one
/home/pblach/php.ini <- this is my edited version in my folder.
 
im using this command but for some reason it doesnt work:
(beeing in the etc directory)
 
cp /home/pblach/php.ini /
cp /home/pblach/php.ini .
 
i tried both commands and they dont work, do i have a wrong syntax?
it says:
cp: cannot create reular file '/php.ini': Permission denied
------------------------------------------------------------------------------------
if you want the file /home/pblach/php.ini to overwrite /etc/php.ini   type
 cp /home/pblach/php.ini /etc/php.ini
i beleive by doin cp /home/pblach/php.ini /  you were trying to write it straight to the root directory which is why you were getting permission errors, which would be good cuz you didnt want it there anyway.
	
	
	
	
	
 
 
	
	
	
		
	Posts: 3,631
	Threads: 899
	Joined: Dec 2003
	
Reputation: 
0
	 
	
	
		
you  are getting permission denied because you are not root
 
to login as root type this
 
su -
 
note the - after su
 
also, do NOT use telnet. it is totally insecure, use ssh instead
 
cheers
 
anyweb
	
	
	
	
	
 
 
	
	
	
		
	Posts: 4
	Threads: 1
	Joined: Nov 2004
	
Reputation: 
0
	 
	
	
		you shold not be using telnet.  try OpenSSH.