Re: A few quick simple Linux questions...

From: Floyd L. Davidson (floyd_at_barrow.com)
Date: 01/29/05


Date: Sat, 29 Jan 2005 10:47:49 -0900

Jim Richardson <warlock@eskimo.com> wrote:
> Eric Haase <ehaase@cs.ucr.edu> wrote:
>>
>> 1. How come I can delete files created by root within my home directory
>> when the permissions shouldn't allow me to do so (permissions = 600,
>> owner = root, group = root)? I'm guessing that its because I have write
>> persmission within my own directory and write permission in a directory
>> overrides file permissions...
>>
>
>sort of, the deletion, acts upon the directory perms. If you want to
>protect the root file, you can chattr it (man chattr for details) making
>it immutable.

Specifically, deleting a file doesn't change the _file_ at all.
It changes only the _directory_ (which is just a special type of
file itself). Hence to delete a file requires write permission
on the directory, and is not affected by the permissions of the
file that is deleted.

>> 3. I'm aware that when a command-line program is running I can suspend
>> it by pressing control-Z. However, this stops execution. How do I send
>> the current running program to the background while still executing
>> (like I executed it with & as the last argument)?
>>
>
>bg (which means, put the program into the background.)
>
>man bash and read the section about job control, it will cover this, and
>more.

Heh, the easiest way to "background" an executing program is
simply to open up another virtual console or xterm window,
depending on whether X is running or not, and shift focus to the
new command line...

>> 4. I'm running Fedora Core 3 (yes, I know it sucks, but I'm still
>> learning), briefly, how does the whole startup process work and where
>> does /etc/init.d come into play? A link would be great if you don't
>> wanna explain. How is this method compared to other Linux dists?
>
>It's pretty standard SysV style init. Slackware uses a more BSD init
>flavoured system, and Gentoo has (imho) the best of the lot, with a nice
>hierarchical init, that's easy to tweak.

It would be much more accurate to say that it is something close
to a standard SysV R3 or R4 init, while what Slackware does is
very similar, not to BSD, but to SysV R2. I haven't looked to
see what present day BSD systems use, but at the time Pat
Volkerding started the Slackware distribution, and made an off
hand remark that the init style was similar to BSD, BSD used
exactly one rc file and did not have runslevels. Nothing at
all like the Slackware init! The main differences between
Slackware and SysV R2 are name changes and different purposes
for specific runlevels.

>For a somewhat detailed explanation of the SysV style init, check out
><http://www.atnf.csiro.au/people/rgooch/linux/boot-scripts/> and the
>SysV section. This isn't Fedora specific, but Fedora follows it pretty
>closely.

Heh, and to understand what Slacware does... either just read
all the rc files to get the big picture, or go to a library and
find an *old* book, c. 1983-4, on UNIX systems administration.

-- 
Floyd L. Davidson           <http://web.newsguy.com/floyd_davidson>
Ukpeagvik (Barrow, Alaska)                         floyd@barrow.com


Relevant Pages

  • Re: Project Ideas and a question
    ... init does allow a chroot before booting the system ... Take the hard work out of building a custom kernel] ... being implemented on one of the sibling versions of FreeBSD, ... And so having an automated installation would have to be unbelievably ...
    (freebsd-hackers)
  • Re: Re: unversal watchdog
    ... strongly that they hate init and that it must not be in BSD. ... for restarting the programs. ...
    (freebsd-hackers)
  • Re: Updating elflibs-8.1.0-i386-2.tgz results in NO MORE BOOT !!!!!
    ... Your Slackware install is from the libc5 days, judging by the init ... that were built on glibc in an old system like that. ...
    (comp.os.linux.setup)
  • Re: Re: unversal watchdog
    ... I was thinking a program to reset a hardware watchdog timer.. ... Would a port of a Linux init do? ... all separate packages on Linux and there is no reason ... strongly that they hate init and that it must not be in BSD. ...
    (freebsd-hackers)