Apories (kai pali :))
Christos Ricudis
Christos_Ricudis at p98.f11.n413.z2.fidonet.org
Tue Apr 29 20:38:54 EEST 1997
Hello Linux-greek-users!
L> leei permission denied. Opote ekana to /dev/cua1 rw gia olous
L> tous xrhstes. Einai sosto?
Oxi. Kanto rw gia ena group, kai bale toys users poy 8eleis na mporoyn na
pairnoyn thlefwno s'auto to group.
(an kai proswpika den moy aresei h xrhsh toy /dev/cuax - protimw th xrhsh twn
kanonikwn ttyS devices kai gia dialin kai gia dialout me taytoxronh xrhsh
swstoy locking apo ola ta programmata, alla ayto einai ligaki pio dyskolo
apoti akoygetai)
L> Etsi de mporei opoisdhpote xrhsths na mou sbhsei to /dev.cua1?
Oxi. To an mporeis na SBHSEIS ena arxeio eksartatai apo ta permissions toy
DIRECTORY sto opoio brisketai. Einai logiko, an skefteis oti to directory den
einai para ena arxeio poy periexei "anafores" se alla arxeia. To an mporeis na
sbhseis h na dhmioyrghseis ena arxeio mesa se kapoio directory, (dhladh
oysiastika na metaballeis thn katastash toy directory), eksartatai mono
apo ta permissions toy idioy toy directory. Des :
paiko:[ricudis]/tmp/koko$ ls -l
total 1
-rw-rw-rw- 1 root root 1 Apr 29 19:40 arxeio
paiko:[ricudis]/tmp/koko$ rm arxeio
rm: arxeio: Permission denied
paiko:[ricudis]/tmp/koko$ ls -ld ../koko
drwxr-xr-x 2 root root 1024 Apr 29 19:40 ../koko/
paiko:[ricudis]/tmp/koko$
Enw an ta permissions toy directory afhnan olous tous users na grapsoyn sto
directory (ASXETA AN O USER EXEI H OXI WRITE PERMISSIONS STO IDIO TO
ARXEIO!!) :
paiko:[ricudis]/tmp/koko$ ls -l
total 1
-r--r--r-- 1 root root 1 Apr 29 20:08 arxeio
paiko:[ricudis]/tmp/koko$ ls -ld ../koko
drwxrwxrwx 2 root root 1024 Apr 29 20:09 ../koko/
paiko:[ricudis]/tmp/koko$ rm arxeio
rm: remove 'arxeio', overriding mode 0444? y
paiko:[ricudis]/tmp/koko$ ls -l
total 0
paiko:[ricudis]/tmp/koko$
Ayth akribws thn idiothta metaballei to attribute t (h alliws "sticky bit").
Ena directory poy exei ayto to attribute epitrepei se ena xrhsth th diagrafh
MONO twn dikwn toy arxeiwn. Xrhsimopoieitai se public writable directories,
opws to /tmp, otan den 8eloyme na dwsoyme se kapoion to dikaiwma na sbhnei
adiakritws ta arxeia twn allwn :-)
L> Kata ta alla enas aplos xrhsths mporei na kanei PPP sundesh?
To pppd einai setuid root akribws gi ayto to logo.
L> Problhma 2) Mporei na mou pei kapoios se ti xrhsimeuoun oi libc
L> kai ti diafora exei me thn libc.so*? (h kana URL h kana man page
L> mh 3ekolonestai na grefetai..)
H libc.a einai h static version ths library. Dhladh, an kaneis link ena
executable me ayth th biblio8hkh, oi routines poy kalei to programma ginontai
"tmhma" toy executable.
H libc.so einai h shared version ths library. Dhladh oi routines poy
periexontai s'aythn den ginontai link me to executable kata to compilation,
alla fortwnontai molis zhth8oyn.
Ta pleonekthmata ths xrhshs twn shared libraries einai 1) paragontai poly
mikrotera executables 2) einai dynaton na kaneis upgrade thn library - kai
synepws tis roytines poy briskontai mesa s'aythn - xwris na peirakseis
ka8oloy ta executables, kai 3) ginetai poly kalyterh diaxeirish mnhmhs,
giati mporoyn polla executables na "moirazontai" thn idia stigmh tis
roytines aytes (apo kei bghke kai to "shared").
An prosekseis, h libc.so einai aplws ena symbolic link sthn libc.so.x.y.z.
To x einai to release number. Allagh toy release number ypodeiknyei
teleia asymbatothta - programmata linked me thn libc.so.5.y.z den prokeitai
pote na xrhsimopoihsoyn thn libc.so.6.y.z. To y einai to version number.
Allagh sto version number den shmainei aparaithta asymbatothta - ta
programmata thn kanoyn link kanonika kai synh8ws th xrhsimopoioyn kai
kanonika - alla den yparxei kai kammia eggyhsh symbatothtas. To z einai
to patchlevel - shnh8ws bugfixes aplws.
To meionekthma poy synepagontai ola ayta einai oti gia na trekseis ena
executable prepei na yparxoyn dia8esimes symbates shared libraries. Otan
p.x. kanw compile ena executable gia kapoio filo, to kanw panta statically
link epeidh gnwrizw oti o filos apokleietai na exei tis dikes moy biblio8hkes
:-)) (xrhsimopoiw thn libc.so.6, aka glibc2).
L> Problhma 3) (gia C)
L> I8ela na kano ena programmataki me thn popen. Auth omos kanei to
L> e3hs : An thn anoi3eis gia read (popen(file,"r") tote mporeis MONO na
L> diabaseis px me fgets. An thn anoi3eis me write (popen(file,"w")) tote
L> MONO grafeis kai to output bgainei sthn stdout.
Nai. Oi pipes einai half duplex. H pairneis, h dineis (kala, mh barate, h
grafeis, h diabazeis :-)). Mporeis na xrhsimopoihseis apey8eias thn pipe()
kai na dhmioyrghseis DYO half duplex pipes, mia gia to stdin kai mia gia to
stdout.
H dikia moy protash einai na parathseis tis pipes :-) kai na kaneis
th doyleia soy me named pipes. Kane man 3 mkfifo gia perissoteres
plhrofories. Oi named pipes (h FIFOs) einai bidirectional kai mporoyn na
xrhsimopoih8oyn kai apo processes poy den exoyn koino parent.
Christos Ricudis, 2:410/3.0, kai sorry gia to prhksimo :-)
--
====================================================================
Gia na mathete pos na xrisimopoiite ton majordomo, stilte e-mail
sto "majordomo at argeas.argos.hol.gr" me 1 grammi sto keimeno: help
Ta archives tis listas einai sto http://www.argos.hol.gr/lists
Gia opoiodipote problima stilte e-mail ston owner-linux-greek-users
====================================================================
More information about the Linux-greek-users
mailing list