making a file with root permissions
So sorry you spent so much time fooling with the file. A quick call here
could have saved you some time, though I do admit to being gone a lot of
If you still have the file on your drive, probably in
/home/bill/YourFileName, then you can simply move it with the 'mv' command as
root! Also note that you can do a "dir" that is quite powerful: 'ls -al'.
'ls' by it self will show files and directories that are not hidden. By
adding the '-al' to the 'ls' command, you can see the whole directory, hidden
files, who *owns* the file, what *group* the file belongs to, and *who* can
*read* the file! This will also show if it can be *executed*! Very powerful.
The next is way to do something special is to vi! open a Konsole, switch to
superuser: 'su -', and do note that space and hiphen, that makes you root
with all of roots *extra stuff (tm)* :) Now open a vi with the command 'vi'.
You now have the most powerful and fastest editor at your disposal. This is
a command driven editor, and it doesn't come with a newbieuserfriendly gui. .
. To add stuff to your file, first press 'i' for (i)nsert, type your text.
Now get out of insert mode with the 'esc' key. Now save your document by
pressing and holding the shift key, and pressing the letters 'zz'. The whole
thing would look like this:
vi AFunnyLetterToJaye.txt (this creates the name and opens the editor
i starts the insert mode
esc back to editor command mode
Shift zz saves the precious work and exits the editor.
Emacs is also workable and useable I THINK as superuser.
I hear the echo like voice say: "Hey Jaye, I DID save that file that I
created as user bill, what else do I need to do after I move it?"
Very good question Bill! I would change the owner & group flags to root.
That is really simple: chown (CHange OWNer) is the command to do this. we
would issue the command: chown root.root YourFileName (enter) :)
Note the first root is the owner, followed by the period and no spaces, the
second root is the group.
"What the hell are groups for?"
Bill, you are delighting me with these great questions! The owner and groups
are important for keeping a tight lock on security of your computer. I don't
want the world to have access to my sound system, so I changed all my group
for sound to 'audio', then I only added two people to that group, root and
jaye. Now if *anyone* else were to log onto my box, they can't touch my
sound card, and those programs that need my sound. Not much security there,
but that is only at first glance. If a program has a security vulnerability
that could possibly give root permissions on a buffer overflow to my sound
demon, then I COULD have had a problem. But my group effort took care of the
problem before it could ever be exploited.
Another very good idea is the 'disk' group. Bill needs to save stuff to the
hard drive, floppy, cdburner etc. However, joeBlow doesn't need this right.
Joeblow might be just simply looking at the webpage my computer provides, but
that is purely a readonly issue. So, bill could hack his way on the box, yet
still not have the right to save a simple text file on the drives! That is
the *root* of this simple security measure, and the root of much anger by
newbies that don't read manuals.
There are several basic, and simple commands I think any user should know.
They are not specifically related to just linux, since I have the same
feeling when I am in a DOS command mode. Things like "dir" and 'ls' are
basics. 'md' and 'mkdir', 'del' 'rm'. Note however that linux provides many
many extra functional arguements for each of the commands. 'man ls' will
give you a very good idea of what I mean.
Now, reading a (man)ual page is ok, but here is another trick you have. Open
up konqueror web browser. Now, in the url field, enter: #ls (click go).
Your browser has the ability to uncompress that manual page, then display it
on your web browser, *and* add hyperlinks to related pages! Some times I
like using it with the scroll bar, other times, a simple console (Konsole) is
what I prefer.
I have a good book here, if you would like to borrow it. It applies to all
linux, but is clearly slanted to the redhat and mandrake flavors. It applies
generically, and I think it helps take out the unknown elements.
End of essay :)
tatah Bill, 73
Jaye Inabnit\ARS ke6sls\/A GNU-Debian linux user\/ http://www.qsl.net/ke6sls
If it's stupid, but works, it ain't stupid. I SHOUT JUST FOR FUN.
Free software, in a free world, for a free spirit. Please Support freedom!
To UNSUBSCRIBE, email to email@example.com
with a subject of "unsubscribe". Trouble? Contact firstname.lastname@example.org