Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

editing files/ deleting them help??

If none of the specific sub-forums seem right for your thread, ask here.
Message
Author
JohnJ
Posts: 53
Joined: 2007-10-15 18:57

editing files/ deleting them help??

#1 Post by JohnJ »

alright this has been driving me nuts, I try to edit a file by going to it and then opening it in a text editor on my debian server right. but when I go to save it, it says I dont have permission. I also try to delete folders and I cant because I need permissiong. How do I delete folders and files, and also how do I edit them? is there a way of doing this in the root terminal? someone help me please!

User avatar
actionM
Posts: 890
Joined: 2007-05-01 02:11

#2 Post by actionM »

did you log in as root first?

su
youpassword

:shock:

I just had to ask...
--------------------
Debian Lenny - Xfce4

Lou
Posts: 1739
Joined: 2006-05-08 02:15

#3 Post by Lou »

I don't know if this is the answer, just how i do it:

If the file in question is mine (created by me or residing my /home), i launch my file manager (xfe) as user, right-click on it press Delete is gone.

If it is anywhere else in the system, then as ROOT or with sudo, i launch xfe and delete it, simple. I hope i understood your question correctly. All this takes but seconds, i have xfe and the rest of my favorite apps keybinded.

If this does not work, then you have a 'permissions problem' which i cannot help you with, and somebody else will explain it to you, because to be honest, i've never had had this problem.

Google has always saved me.

good luck!
Devuan Jessie - IceWM - vimperator - no DM
KISS - Keep It Simple, Stupid

JohnJ
Posts: 53
Joined: 2007-10-15 18:57

#4 Post by JohnJ »

ok I turn the machine on and login as me right, and then I go to the terminal and do the login as root. But once I do that I still can't go and edit those files by opening them manually. I dont know how to open them in the terminal with the debian default text editor. I can edit files and delete them in the terminal if I'm logged in as root but I just dont know the commands to delete files or edit them in the terminal. I wasn't able to move files manually because they were permissioned, but I figured out how to move files as root in the terminal.

So yea basically I just need to know the commands on how to edit the files with a text editor and I need the commands to delete files in the terminal. anyone know?

User avatar
rickh
Posts: 3434
Joined: 2006-06-29 02:13
Location: Albuquerque, NM USA

#5 Post by rickh »

Google "basic bash commands"
Debian-Lenny/Sid 32/64
Desktop: Generic Core 2 Duo, EVGA 680i, Nvidia
Laptop: Generic Intel SIS/AC97

User avatar
actionM
Posts: 890
Joined: 2007-05-01 02:11

#6 Post by actionM »

You just want some basic commands? Here is the first on the list at google.

http://www.ss64.com/bash/

be careful with that rm -r command :)

You can use nano to edit files.
nano /path/to/your/file.txt
after your done hold down ctrl + x to save.
--------------------
Debian Lenny - Xfce4

Lou
Posts: 1739
Joined: 2006-05-08 02:15

#7 Post by Lou »

actionM wrote: after your done hold down ctrl + x to save.
Isn't it:

Ctrl + O <Enter>
Ctrl + X

????
Devuan Jessie - IceWM - vimperator - no DM
KISS - Keep It Simple, Stupid

User avatar
actionM
Posts: 890
Joined: 2007-05-01 02:11

#8 Post by actionM »

Your right. Ctrl + x is to exit, but it asks if you wana save it as well.

I should have said "to exit and save if changes were made"
--------------------
Debian Lenny - Xfce4

Lou
Posts: 1739
Joined: 2006-05-08 02:15

#9 Post by Lou »

actionM wrote:Your right. Ctrl + x is to exit, but it asks if you wana save it as well.

I should have said "to exit and save if changes were made"
My apologies, i did not know that.

BTW, it's "You're right", do not reaffirm the opinion the world has of us. Typos are forgiven, but contractions have to be spelled correctly :)
Devuan Jessie - IceWM - vimperator - no DM
KISS - Keep It Simple, Stupid

User avatar
987687
Posts: 2110
Joined: 2007-06-11 10:58
Location: Vacation Land

#10 Post by 987687 »

If you want to browse files as root, the same as you would with a regular user do this in a root terminal:
if you use gnome:

Code: Select all

nautilus
if you are using KDE:

Code: Select all

konqueror
that will open the file browser as root, and any file you open from there will be opened as root. But you have to be careful with this, make sure you know what windows are opened as root, and which are not.
Desktop - 3.2GHz core2 quad
Laptop - 2.4GHz core2 duo ancient macbook
Bring back the penguin!! http://tinyurl.com/d57jwv

User avatar
actionM
Posts: 890
Joined: 2007-05-01 02:11

#11 Post by actionM »

"You're" bustin' my balls. :D
--------------------
Debian Lenny - Xfce4

Lou
Posts: 1739
Joined: 2006-05-08 02:15

#12 Post by Lou »

"You're" the reason the world thinks "we're" ignorant, uncouth, and classless. We "can't" even write in English and the limeys laugh at us.

What the hell, if the boy from Texas talks about "nukular" attacks what can we expect from the rest of the trailer-trash?
Devuan Jessie - IceWM - vimperator - no DM
KISS - Keep It Simple, Stupid

JohnJ
Posts: 53
Joined: 2007-10-15 18:57

#13 Post by JohnJ »

is there a way to login as root? like when I turn the machine on and it starts and goes to the login screen, is there a way to login as root?

or is there a way to login as root instead of using the terminal so I can just browse my files easily?

Well I wants to edit files from my web server such as apache2-default index.html page. It has permissions but is there a way I can be root and just go into those files and open them up, edit them and then save them without using the terminal?

User avatar
actionM
Posts: 890
Joined: 2007-05-01 02:11

#14 Post by actionM »

987687 wrote:If you want to browse files as root, the same as you would with a regular user do this in a root terminal:
if you use gnome:

Code: Select all

nautilus
if you are using KDE:

Code: Select all

konqueror
that will open the file browser as root, and any file you open from there will be opened as root. But you have to be careful with this, make sure you know what windows are opened as root, and which are not.
JohnJ, did you try this method? Its pretty easy.
--------------------
Debian Lenny - Xfce4

User avatar
rickh
Posts: 3434
Joined: 2006-06-29 02:13
Location: Albuquerque, NM USA

#15 Post by rickh »

Real Debian users do not log into a GUI desktop interface as "root". The Debian developers have not made it impossible, but they have made it non-obvious for very good reasons.
Debian-Lenny/Sid 32/64
Desktop: Generic Core 2 Duo, EVGA 680i, Nvidia
Laptop: Generic Intel SIS/AC97

JohnJ
Posts: 53
Joined: 2007-10-15 18:57

#16 Post by JohnJ »

oh right on, thanks

yea it gets a lil annoying when I have to do it in the terminal, takes a long time. Its ok but I was just wondering if there was a quicker way because I can't access my files in my www folder or any of those folders unless I go throught terminal and log in as root and do it through there.

User avatar
isilia
Posts: 112
Joined: 2007-11-10 15:31
Location: The Netherlands
Contact:

#17 Post by isilia »

JohnJ wrote:oh right on, thanks

yea it gets a lil annoying when I have to do it in the terminal, takes a long time. Its ok but I was just wondering if there was a quicker way because I can't access my files in my www folder or any of those folders unless I go throught terminal and log in as root and do it through there.
Just practice a little with terminal work, its really easy (and quick!) once you get the hang of it!

User avatar
987687
Posts: 2110
Joined: 2007-06-11 10:58
Location: Vacation Land

#18 Post by 987687 »

rickh wrote:Real Debian users do not log into a GUI desktop interface as "root". The Debian developers have not made it impossible, but they have made it non-obvious for very good reasons.
I don't use the GUI for doing administration/root stuff. But if someone wants to use a GUI let them. It is Linux after all, and all options should be open.
Desktop - 3.2GHz core2 quad
Laptop - 2.4GHz core2 duo ancient macbook
Bring back the penguin!! http://tinyurl.com/d57jwv

User avatar
Telemachus
Posts: 4574
Joined: 2006-12-25 15:53
Been thanked: 2 times

#19 Post by Telemachus »

987687 wrote:
rickh wrote:Real Debian users do not log into a GUI desktop interface as "root". The Debian developers have not made it impossible, but they have made it non-obvious for very good reasons.
I don't use the GUI for doing administration/root stuff. But if someone wants to use a GUI let them. It is Linux after all, and all options should be open.
I wouldn't take it too seriously. I suspect that Real "Real Debian users" don't use the phrase "Real Debian users".

User avatar
rickh
Posts: 3434
Joined: 2006-06-29 02:13
Location: Albuquerque, NM USA

#20 Post by rickh »

But if someone wants to use a GUI [as root] let them. It is Linux after all, and all options should be open.
As MD used to say, if you want to pick your nose with a loaded pistol, that's your choice. OTOH, I'd be remiss to not caution you against it in the strongest possible terms.

So, Telamachus, you're a "real" Debian user. Can you remember the last time you logged into a GUI as root? That kind of habit is for Ubuntu users.
Debian-Lenny/Sid 32/64
Desktop: Generic Core 2 Duo, EVGA 680i, Nvidia
Laptop: Generic Intel SIS/AC97

Post Reply