LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 03-18-2013, 07:21 AM   #1
Mr. Alex
Senior Member
 
Registered: May 2010
Distribution: No more Linux. Done with it.
Posts: 1,238

Rep: Reputation: Disabled
Why can't I edit files at FTP server with gedit, but can with mcedit?


When I am logged in to FTP server of a hosting, I can't edit files with gedit there. But I can do it with mcedit. How come? It would be much more convenient to use gedit without downloading each file everytime. But if FTP doesn't allow it, why is mcedit capable of editing on FTP side?
 
Old 03-18-2013, 07:29 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,849

Rep: Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309
if you are speaking about the editor of midnight commander I think it downloads the file before editing and uploads back at the end.
gedit has a similar plugin.
 
Old 03-18-2013, 07:32 AM   #3
#root
Member
 
Registered: Mar 2013
Location: in my house
Distribution: Ubuntu,Backtrack,Fedora
Posts: 38

Rep: Reputation: 5
how do you access your root user .. with
Quote:
su -
or just
Quote:
su
if you use just su then try su -
sometime problem with gedit exists because you dont get the root environment

Last edited by #root; 03-18-2013 at 07:51 AM.
 
Old 03-18-2013, 08:26 AM   #4
eklavya
Member
 
Registered: Mar 2013
Posts: 636

Rep: Reputation: 142Reputation: 142
First run following command in terminal
$ sudo gksu nautilus

now open ftp account in directory. Type host address in 'Location' like this
ftp://name-of-my-host.com

it asks "connect anonymously" or "connect as a user", Select second option and enter username and password of the account.
Now open project directory and open files in gedit.

I don't think it will prevent you to save the files.

Take a look at screenshot.

Click image for larger version

Name:	Untitled.png
Views:	150
Size:	85.2 KB
ID:	12083

Last edited by eklavya; 03-18-2013 at 08:44 AM.
 
Old 03-18-2013, 12:44 PM   #5
Mr. Alex
Senior Member
 
Registered: May 2010
Distribution: No more Linux. Done with it.
Posts: 1,238

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by pan64 View Post
if you are speaking about the editor of midnight commander I think it downloads the file before editing and uploads back at the end.
gedit has a similar plugin.
I did not mention that I have MATE version of gedit, “pluma”. So I put those two files into /home/alex/.mateconf/apps/pluma/plugins and there's no plugin in settings. I expected this not to work from the beginning.

What I do to edit files with mcedit is I `cd` into FTP dir, select a file and hit F4. It opens in mcedit and is ready to be edited. I don't think mcedit actually downloads files...

Quote:
Originally Posted by #root View Post
how do you access your root user .. with or just
if you use just su then try su -
sometime problem with gedit exists because you dont get the root environment
I do it this way: open ftp dir in mc, navigate to a file and type in command line of mc “pluma [ALT+Enter]”. Then I get error “Cannot execute commands on non-local filesystems.” So adding sudo will not make any difference there; I tried.

Quote:
Originally Posted by eklavya View Post
First run following command in terminal
$ sudo gksu nautilus

now open ftp account in directory. Type host address in 'Location' like this
ftp://name-of-my-host.com

it asks "connect anonymously" or "connect as a user", Select second option and enter username and password of the account.
Now open project directory and open files in gedit.

I don't think it will prevent you to save the files.

Take a look at screenshot.

Attachment 12083
I don't have Gnome/Mate environment, just pluma. I operate with Midnight Commander.

P. S. It's not that important to be able to edit files on FTP with pluma, I just asked to know why pluma is not capable of doing thing that mcedit is capable of.
 
Old 03-19-2013, 01:31 AM   #6
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,849

Rep: Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309
so please open a file (with mcedit from a remote ftp site) and execute the following:
ps -ef | grep mc
you will see the following result (or something similar):
....... mc
....... /bin/sh /usr/bin/sensible-editor /tmp/mc-<user>/ftpfs<some file name>
....... /usr/bin/mcedit /tmp/mc-<user>/ftpfs<some file name>
....... grep mc

From this list you can clearly see mcedit opened a local file in the /tmp/mc-<username> directory. The name of the file is ftpfs<something><original name>

So mcedit does not edit the file on the remote side, just the upload/download process is hidden.
using midnight commander and configure pluma as editor (in ~/.selected_editor) may work and F4 will open pluma for you. But I'm not really sure because I have no MATE.
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Edit default timeout value in Linux FTP server archana485 Linux - Networking 2 09-09-2011 05:55 AM
How to edit root-owned files on server? Mountain Linux - Server 2 01-29-2009 11:36 PM
files not visible in ftp site (but present in the /var/ftp/folder of the server) dongrila Linux - Newbie 2 12-23-2007 10:09 PM
ftp server - Pure ftp - logs in OK but no files visible tp11235 Linux - Networking 2 08-30-2005 05:11 AM
how can I restrict ftp users listing files from a pure-ftp server adrianmak Linux - Networking 2 12-31-2002 08:23 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:49 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration