Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Wed Mar 02, 2011 12:07 pm 
Offline
Senior Member

Joined: Sun Mar 28, 2010 2:43 pm
Posts: 76
Website: http://tomakefast.com
Location: Texas
Maybe this is an obvious one.

Let's say I mount a remote server using Nautilus (which is running on my laptop) and I'm not root on the remote server, and I want to use gedit to save a file owned by root on the remote server, is it possible for me to "sudo su" on the remote server from inside gedit so I can save the file?

I can edit the file from the shell, but I'd rather use gedit. Does this make sense? Both remote server and my laptop using Fedora.

Also I could just chown the file but I'd rather leave it as root:root.

_________________
PHP Development @ Tomakefast


Top
   
 Post subject:
PostPosted: Wed Mar 02, 2011 12:24 pm 
Offline
Senior Member

Joined: Mon Oct 27, 2008 10:24 am
Posts: 173
Website: http://www.worshiproot.com
Why would you "sudo su"? That's pretty redundant in most cases...

Why not save the file as a normal user, then copy it in place as root?


Top
   
 Post subject:
PostPosted: Wed Mar 02, 2011 12:44 pm 
Offline
Senior Member

Joined: Sun Mar 28, 2010 2:43 pm
Posts: 76
Website: http://tomakefast.com
Location: Texas
JshWright wrote:
Why would you "sudo su"? That's pretty redundant in most cases...

Why not save the file as a normal user, then copy it in place as root?


I don't have the root password, I'm a user working for somebody.

I chown'd the file, works fine with gedit now (I asked the client first) so problem solved.

But I'm still interested if there's a way to have gedit automatically "sudo whatever" so I can edit files with "root" ownership.

(Yes, I'm pretty much a Linux noob.)

_________________
PHP Development @ Tomakefast


Top
   
 Post subject:
PostPosted: Wed Mar 02, 2011 5:38 pm 
Offline
Senior Member

Joined: Fri Dec 10, 2010 6:45 pm
Posts: 63
If you're editing your sever from a mounted drive, you can't sudo (or gksudo in your case) into it. You can only log in as root.

Editors like vim that live in the command line are a lot more efficient at editing text than gedit, once you learn them a bit. In addition you avoid these inconveniences.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group