Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[RISOLTO]problema permessi di sistema
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian)
View previous topic :: View next topic  
Author Message
GoraNz
Apprentice
Apprentice


Joined: 27 Jul 2008
Posts: 181
Location: Latina, Pisa

PostPosted: Thu Apr 09, 2009 9:40 pm    Post subject: [RISOLTO]problema permessi di sistema Reply with quote

Ciao tutti! ho un bel problemone con emerge: quando lancio una qualsiasi installazione che prevede un download mi presenta sempre lo stesso problema: (in questo esempio ho provato ad emerge il mirrorselect, misteriosamente disinstallato)
Code:
Calculating dependencies... done!

>>> Verifying ebuild manifests

>>> Starting parallel fetch

>>> Emerging (1 of 2) net-analyzer/netselect-0.3-r2
[Errno 13] Permission denied:
   /bin/bash -c touch "/usr/portage/distfiles/.__portage_test_write__" 2>/dev/null ; rval=$? ; rm -f  "/usr/portage/distfiles/.__portage_test_write__" ; exit $rval
[Errno 13] Permission denied:
   /bin/bash -c touch "/usr/portage/distfiles/.locks/.__portage_test_write__" 2>/dev/null ; rval=$? ; rm -f  "/usr/portage/distfiles/.locks/.__portage_test_write__" ; exit $rval
>>> Downloading 'ftp://mirror.switch.ch/mirror/gentoo/distfiles/netselect-0.3.tar.gz'
[Errno 13] Permission denied:
   /usr/bin/wget -t 5 -T 60 --passive-ftp -O /usr/portage/distfiles/netselect-0.3.tar.gz ftp://mirror.switch.ch/mirror/gentoo/distfiles/netselect-0.3.tar.gz
>>> Downloading 'http://alumnit.ca/~apenwarr/netselect/netselect-0.3.tar.gz'
[Errno 13] Permission denied:
   /usr/bin/wget -t 5 -T 60 --passive-ftp -O /usr/portage/distfiles/netselect-0.3.tar.gz http://alumnit.ca/~apenwarr/netselect/netselect-0.3.tar.gz
!!! Couldn't download 'netselect-0.3.tar.gz'. Aborting.
ho provato a dare un
Code:
wget ftp://mirror.switch.ch/mirror/gentoo/distfiles/netselect-0.3.tar.gz
e scarica senza problemi quindi problemi di linea non ce ne sono. Ho provato anche a vedere nelle cartelle che cita sopra nell'errore: tutti i file e le cartelle contenuti in /usr/portage hanno i permessi a 755, quindi credo sia tutto apposto. Come mai mi da questo errore? sto cercando disperatamente di installare un pacchetto importante per il mio server ma non riesco a farlo con l'emerge in panne. Vi ringrazio anticipatamente per l'aiuto. Ciao

Last edited by GoraNz on Wed Apr 15, 2009 3:41 pm; edited 2 times in total
Back to top
View user's profile Send private message
djinnZ
Advocate
Advocate


Joined: 02 Nov 2006
Posts: 4831
Location: somewhere in L.O.S.

PostPosted: Thu Apr 09, 2009 10:15 pm    Post subject: Reply with quote

direi che ti abbisogna un
Code:
rm /usr/portage/distfiles/netselect-0.3* ; rm "/usr/portage/distfiles/.__portage_test_write__"
od un
Code:
df
per vedere se non hai finito lo spazio sulla partizione. Nel caso hai partizione unica per tutto il sistema un
Code:
rm -Rf /var/tmp/portage/*
non ci starebbe male.
_________________
scita et risus abundant in ore stultorum sed etiam semper severi insani sunt:wink:
mala tempora currunt...mater stultorum semper pregna est :evil:
Murpy'sLaw:If anything can go wrong, it will - O'Toole's Corollary:Murphy was an optimist :wink:
Back to top
View user's profile Send private message
GoraNz
Apprentice
Apprentice


Joined: 27 Jul 2008
Posts: 181
Location: Latina, Pisa

PostPosted: Fri Apr 10, 2009 7:53 am    Post subject: Reply with quote

lo spazio sul disco c'è perchè con quel comando mi dice che c'è solo il 5% in uso. Per il resto ho cancellato i file temporanei del portage da /var/tmp/portage ma gli altri due non c'erano. Questo perchè forse li cancella da solo durante il tentativo di installazione perchè mi riporta queste righe:
Code:
/bin/bash -c touch "/usr/portage/distfiles/.locks/.__portage_test_write__" 2>/dev/null ; rval=$? ; rm -f  "/usr/portage/distfiles/.locks/.__portage_test_write__" ; exit $rval

  /bin/bash -c touch "/usr/portage/distfiles/.__portage_test_write__" 2>/dev/null ; rval=$? ; rm -f  "/usr/portage/distfiles/.__portage_test_write__" ; exit $rval
e con questi cancella il file ".___portage_test_write__" da entrambe le directory incriminate, mentre la directory con netselect-0.3 non esiste proprio in distfiles. E continua a darmi permission denied non so piu cosa fare. Ti ringrazio comunque per la risposta
Back to top
View user's profile Send private message
Ic3M4n
Advocate
Advocate


Joined: 02 Nov 2004
Posts: 3489
Location: Bergamo.

PostPosted: Fri Apr 10, 2009 12:37 pm    Post subject: Reply with quote

quali sono i permessi della dir /usr/portage/distfiles? o comunque dove li piazzi?
io ho:
Code:
ls -l /usr/portage/ | grep distfiles
drwxrwsr-x   6 root portage 155648 10 apr 15:07 distfiles

se utilizzi lo scaling dei privilegi e fai tutto come user portage credo che sia necessario avere i permessi di scrittura per il gruppo.
Back to top
View user's profile Send private message
GoraNz
Apprentice
Apprentice


Joined: 27 Jul 2008
Posts: 181
Location: Latina, Pisa

PostPosted: Fri Apr 10, 2009 12:50 pm    Post subject: Reply with quote

i permessi sono esattamente come quelli che hai postato te non so proprio da cosa deriva questo permission denied infatti..


EDIT: ho provato anche a fixare uno degli ultimi bug riscontrati nell'openssl, e nello scaricamento mi da lo stesso errore! raga sto nel panico vorrei riuscire a mettere apposto questo piccolo problema perchè gentoo con l'emerge in questo stato non è gentoo-_-
Back to top
View user's profile Send private message
GoraNz
Apprentice
Apprentice


Joined: 27 Jul 2008
Posts: 181
Location: Latina, Pisa

PostPosted: Fri Apr 10, 2009 4:47 pm    Post subject: Reply with quote

devo avere una ramificazione di permessi errati perchè creando un utente con shell /bin/bash mi dice che non può eseguire la suddetta shell perchè non ho i permessi, e anche settandoli a 777 per /bin/bash e /bin/sh e mettendo come proprietario il suddetto user creato non mi fa accedere dicendo che non ho i privilegi adatti. Ragazzi sto nel panico questo conflitto di permessi mi permette di usare solo root e su questo server ho molti client user che devono avere il loro ambiente: come posso fare per ristabilire tutti i permessi in modo che funzionino con tutti gli altri user?
Back to top
View user's profile Send private message
djinnZ
Advocate
Advocate


Joined: 02 Nov 2006
Posts: 4831
Location: somewhere in L.O.S.

PostPosted: Fri Apr 10, 2009 6:31 pm    Post subject: Reply with quote

Se hai lo sticky bit impostato non ti basta avere il permesso di scrittura sulla directory per cancellare un file, per dirne una. Posta qualcosa o prova a cambiare i permessi per tutto l'albero.

Ma innanzitutto dai qualche dettaglio in più, la mia sfera di cristallo è sempre incrinata e non vedo bene attraverso le nebbie del tempo... :wink:

Tanto per curiosità (si fa per dire) che fs usi?
_________________
scita et risus abundant in ore stultorum sed etiam semper severi insani sunt:wink:
mala tempora currunt...mater stultorum semper pregna est :evil:
Murpy'sLaw:If anything can go wrong, it will - O'Toole's Corollary:Murphy was an optimist :wink:
Back to top
View user's profile Send private message
GoraNz
Apprentice
Apprentice


Joined: 27 Jul 2008
Posts: 181
Location: Latina, Pisa

PostPosted: Fri Apr 10, 2009 7:16 pm    Post subject: Reply with quote

hai ragione scusami. Cerco di darvi qualche informazione in piu se non sono esauriente chiedetemi qualunque cosa: allora come fs uso ext3 per la partizione di root, per il resto volevo anche io cercare di cambiare i permessi per tutto l'albero ma non so quali solo quelli di default. Stavo cercando di andare su un'altra mia macchina gentoo e vedere un pò quali sono i permessi per ristabilire quelli di default copiandoli, ma se avete un modo piu veloce sarebbe ottimo. Ora vi riporto qualche ls di alcune directory:
Code:
directory principale /

d2b / # ls -l
total 61
drwx------  2 root root  4096 Mar 26 17:39 bin
drwx------  4 root root  1024 Feb 20 09:56 boot
drwxr-xr-x 15 root root  3980 Apr 10 19:15 dev
drwx------ 44 root root  4096 Apr 10 19:17 etc
drwxrwx---  8 root root  4096 Apr 10 19:13 home
drwx------  8 root root  4096 Mar 26 18:35 lib
drwx------  2 root root 16384 Feb 19 16:29 lost+found
drwx------  5 root root  4096 Apr  5 13:05 mnt
drwx------  2 root root  4096 Jun 11  2008 opt
dr-xr-xr-x 66 root root     0 Apr  8 14:31 proc
drwx------  6 root root  4096 Apr 10 18:33 root
drwx------  2 root root  4096 Apr  7 19:10 sbin
drwxr-xr-x 12 root root     0 Apr  8 14:31 sys
drwx------  4 root root  4096 Apr 10 17:40 tmp
drwx------ 13 root root  4096 Mar 26 16:20 usr
drwx------ 12 root root  4096 Feb 20 00:39 var
d2b / #

Code:
directory /etc

total 504
-rwx------ 1 root root  4038 Feb 19 20:40 DIR_COLORS
-rwx------ 1 root root    26 Apr  8 14:31 adjtime
drwx------ 2 root root  4096 Feb 20 12:08 bash
drwx------ 3 root root  4096 Feb 19 20:43 ca-certificates
-rwx------ 1 root root  4389 Apr 11  2008 ca-certificates.conf
drwx------ 2 root root  4096 Apr 10 17:41 conf.d
drwx------ 2 root root  4096 Feb 20 00:57 cron.d
drwx------ 2 root root  4096 Feb 20 09:51 cron.daily
-rwx------ 1 root root   220 Feb 20 00:57 cron.deny
drwx------ 2 root root  4096 Feb 20 00:39 cron.hourly
drwx------ 2 root root  4096 Feb 20 00:39 cron.monthly
drwx------ 2 root root  4096 Apr 10 00:29 cron.weekly
-rwx------ 1 root root   616 Feb 20 00:57 crontab
-rwx------ 1 root root   997 Apr 10 17:41 csh.env
drwx------ 5 root lp    4096 Mar 26 17:48 cups
drwx------ 2 root root  4096 Jun 19  2008 default
drwx------ 2 root root  4096 Mar 15 20:20 dhcp
-rwx------ 1 root root  1089 Feb 19 17:35 dispatch-conf.conf
drwx------ 2 root root  4096 Feb 20 01:14 eclean
drwxr-xr-x 4 root root  4096 Mar 26 16:20 env.d
-rwx------ 1 root root    97 Mar 26 18:34 environment
drwx------ 3 root root  4096 Jun 11  2008 eselect
-rwx------ 1 root root  1718 Feb 19 17:35 etc-update.conf
-rwx------ 1 root root   399 Feb 19 17:52 filesystems
drwx------ 4 root root  4096 Feb 19 23:47 fonts
-rwx------ 1 root root  1070 Feb 20 18:34 fstab
-rwx------ 1 root root   407 Mar 13 22:17 ftpusers
-rwx------ 1 root root  2139 Feb 20 02:39 gai.conf
-rwx------ 1 root root    37 Feb 19 17:52 gentoo-release
drwx------ 2 root root  4096 Jun 19  2008 gpm
-rw------- 1 root root  2564 Apr 10 19:17 group
-rwx------ 1 root root  2529 Apr 10 19:17 group-
-rwx------ 1 root root   936 Mar 26 17:33 host.conf
-rwx------ 1 root root  1072 Feb 22 19:08 hosts
drwx------ 2 root root  4096 Apr 10 17:41 init.d
-rwx------ 1 root root  1645 Feb 19 17:51 inittab
-rwx------ 1 root root  2102 Feb 19 17:52 inputrc
-rwx------ 1 root root    30 Feb 19 17:52 issue
-rwx------ 1 root root   701 Feb 19 17:52 issue.logo
-rw-r--r-- 1 root root 19333 Apr 10 17:41 ld.so.cache
-rwx------ 1 root root   213 Mar 26 16:20 ld.so.conf
-rwx------ 1 root root   874 Feb 20 09:09 locale.gen
-rwx------ 1 root root  2652 Mar 26 16:56 localtime
-rwx------ 1 root root  8869 Feb 12  2008 login.defs
-rwx------ 1 root root  1194 Apr  9 23:47 logrotate.conf
drwx------ 2 root root  4096 Apr  9 23:23 logrotate.d
drwx------ 2 root root  4096 Feb 20 00:39 mail
-rwx------ 1 root root  2235 Feb 20 00:39 mailcap
-rwx------ 1 root root  1498 Apr 10 00:24 make.conf
-rwx------ 1 root root     0 Feb 20 22:14 make.conf.backup
-rwx------ 1 root root   410 Jun 19  2008 make.conf.catalyst
lrwxrwxrwx 1 root root    40 Feb 19 17:35 make.globals -> ../usr/share/portage/config/make.globals
lrwxrwxrwx 1 root root    53 Feb 19 17:37 make.profile -> /usr/portage/profiles/default/linux/x86/2008.0/server
-rwx------ 1 root root  4612 Feb 12  2008 man.conf
-rwx------ 1 root root   417 Jun 17  2008 mke2fs.conf
-rwx------ 1 root root  3063 Feb 20 09:52 modprobe.conf
drwx------ 2 root root  4096 Feb 20 09:52 modprobe.d
drwx------ 2 root root  4096 Jun 19  2008 modules.autoload.d
-rwx------ 1 root root  1813 Feb 20 09:52 modules.conf
drwx------ 2 root root  4096 Jun 19  2008 modules.d
-rw-r--r-- 1 root root   528 Apr  8 14:31 mtab
drwx------ 2 root root  4096 Mar 13 22:36 mysql
-rwx------ 1 root root  8347 Feb 19 18:26 nanorc
-rwx------ 1 root root   219 Feb 19 17:52 networks
-rwx------ 1 root root  1158 Mar 26 17:33 nscd.conf
-rwx------ 1 root root   508 Mar 26 17:33 nsswitch.conf
-rwx------ 1 root root     0 Feb 20 12:01 ntp.conf
drwx------ 4 root root  4096 Mar 13 22:37 openldap
drwx------ 2 root root  4096 Jun 11  2008 opt
drwx------ 2 root root  4096 Apr  7 19:10 pam.d
-rwx------ 1 root root     3 Feb 20 00:44 papersize
-rw------- 1 root root  2879 Apr 10 19:17 passwd
-rwx------ 1 root root  2834 Apr 10 19:17 passwd-
drwx------ 3 root root  4096 Feb 22 17:50 portage
drwx------ 5 root root  4096 Feb 20 09:52 ppp
-rwx------ 1 root root  2141 Feb 19 17:52 profile
-rwx------ 1 root root   999 Apr 10 17:41 profile.env
-rwx------ 1 root root  5681 Feb 19 17:52 protocols
-rw------- 1 root root   890 Apr  8 12:44 pureftpd.passwd
-rw------- 1 root root  3056 Apr  8 12:44 pureftpd.pdb
-rwx------ 1 root root   134 Feb 12  2008 pwdb.conf
-rwx------ 1 root root  1644 Feb 19 17:52 rc.conf
-rw-r--r-- 1 root root    67 Apr  8 15:09 resolv.conf
drwx------ 2 root root  4096 Mar 26 16:20 revdep-rebuild
-rwx------ 1 root root   273 Feb 19 18:14 rmt
-rwx------ 1 root root  1615 Mar 26 17:33 rpc
-rwx------ 1 root root   405 Feb 19 20:40 rsyncd.conf
drwx------ 6 root root  4096 Jun 11  2008 runlevels
drwx------ 2 root root  4096 Apr  7 19:10 samba
-rwx------ 1 root root   666 Feb 19 17:52 scsi_id.config
-rwx------ 1 root root   262 Apr  5 13:18 securetty
drwx------ 4 root root  4096 Mar 26 18:35 security
-rwx------ 1 root root 35989 Feb 19 17:52 services
-rw------- 1 root root  3019 Apr 10 19:17 shadow
-rwx------ 1 root root  2989 Apr 10 19:17 shadow-
-rwx------ 1 root root   118 Feb 19 17:52 shells
drwx------ 3 root root  4096 Jun 19  2008 skel
drwx------ 2 root root  4096 Feb 20 19:41 ssh
drwx------ 5 root root  4096 Jun 19  2008 ssl
drwx------ 2 root root  4096 Feb 20 00:48 ssmtp
-rwx------ 1 root root  1459 Feb 19 17:52 sysctl.conf
drwx------ 2 root root  4096 Apr  5 12:55 syslog-ng
drwx------ 9 root root  4096 Jun 11  2008 terminfo
drwx------ 3 root root  4096 Feb 20 12:08 udev
drwx------ 3 root root  4096 Feb 19 23:46 unixODBC
-rwx------ 1 root root   790 Feb 20 09:51 updatedb.conf
-rwx------ 1 root root  4256 Feb 12  2008 wgetrc
-rwx------ 1 root root  1010 Feb 20 00:44 xinetd.conf
drwx------ 2 root root  4096 Apr  7 19:10 xinetd.d
drwx------ 2 root root  4096 Jun 19  2008 xml

Code:
directory /bin

d2b bin # ls -l
total 5464
-rwx------ 1 root     root    9524 Mar 26 16:44 attr
lrwxrwxrwx 1 root     root      10 Feb 19 18:13 awk -> gawk-3.1.6
-rwx------ 1 root     root   25976 Feb 19 20:40 basename
-rwxrwx--- 1 d2badmin users 651148 Feb 19 18:25 bash
lrwxrwxrwx 1 root     root       7 Mar 26 17:39 bb -> busybox
lrwxrwxrwx 1 root     root       5 Feb 19 17:45 bunzip2 -> bzip2
-rwx------ 1 root     root  847244 Mar 26 17:39 busybox
lrwxrwxrwx 1 root     root       2 Mar 26 17:39 busybox.static -> bb
lrwxrwxrwx 1 root     root       5 Feb 19 17:45 bzcat -> bzip2
-rwx------ 1 root     root   30148 Feb 19 17:45 bzip2
-rwx------ 1 root     root   30128 Feb 19 20:40 cat
-rwx------ 1 root     root    9556 Feb 19 20:35 chacl
-rwx------ 1 root     root    9544 Feb 19 21:12 chattr
-rwx------ 1 root     root    2277 Feb 19 17:52 checkpath
-rwx------ 1 root     root   46612 Feb 19 20:40 chgrp
-rwx------ 1 root     root   42492 Feb 19 20:40 chmod
-rwx------ 1 root     root   46620 Feb 19 20:40 chown
-rwx------ 1 root     root   25984 Feb 19 20:40 chroot
-rwx------ 1 root     root   71304 Feb 19 20:40 cp
-rwx------ 1 root     root  110284 Feb 19 17:46 cpio
-rwx------ 1 root     root   38308 Feb 19 20:40 cut
-rwx------ 1 root     root   54792 Feb 19 20:40 date
-rwx------ 1 root     root   50748 Feb 19 20:40 dd
-rwx------ 1 root     root   46648 Feb 19 20:40 df
-rwx------ 1 root     root   92024 Feb 19 20:40 dir
-rwx------ 1 root     root   25980 Feb 19 20:40 dirname
-rwx------ 1 root     root    5404 Feb 19 21:11 dmesg
lrwxrwxrwx 1 root     root       8 Feb 19 18:12 dnsdomainname -> hostname
lrwxrwxrwx 1 root     root       8 Feb 19 18:12 domainname -> hostname
-rwx------ 1 root     root   71264 Feb 19 20:40 du
-rwx------ 1 root     root   25976 Feb 19 20:40 echo
-rwx------ 1 root     root   39580 Mar 13 22:17 ed
lrwxrwxrwx 1 root     root       4 Feb 19 18:11 egrep -> grep
-rwx------ 1 root     root   25984 Feb 19 20:40 env
-rwx------ 1 root     root   34260 Feb 19 20:40 expr
-rwx------ 1 root     root   21868 Feb 19 20:40 false
lrwxrwxrwx 1 root     root       4 Feb 19 18:11 fgrep -> grep
-rwx------ 1 root     root   22212 Feb 19 20:34 fuser
lrwxrwxrwx 1 root     root      10 Feb 19 18:13 gawk -> gawk-3.1.6
-rwx------ 1 root     root  309628 Feb 19 18:13 gawk-3.1.6
-rwx------ 1 root     root   18172 Feb 19 20:35 getfacl
-rwx------ 1 root     root   13980 Mar 26 16:44 getfattr
-rwx------ 1 root     root  214676 Feb 19 18:11 grep
-rwx------ 1 root     root    9536 Feb 19 21:05 groups
-rwx------ 1 root     root      61 Feb 19 18:11 gunzip
-rwx------ 1 root     root   53196 Feb 19 18:11 gzip
-rwx------ 1 root     root   38356 Feb 19 20:40 head
-rwx------ 1 root     root    9556 Feb 19 18:12 hostname
lrwxrwxrwx 1 root     root      20 Feb 19 18:13 igawk -> /usr/bin/igawk-3.1.6
-rwx------ 1 root     root   13680 Feb 19 18:27 kill
-rwx------ 1 root     root   38400 Feb 19 20:40 ln
-rwx------ 1 root     root   78412 Feb 19 18:11 loadkeys
-rwx------ 1 root     root   30876 Feb 19 21:05 login
-rwx------ 1 root     root   92024 Feb 19 20:40 ls
-rwx------ 1 root     root    9536 Feb 19 21:12 lsattr
-rwx------ 1 root     root    9548 Feb 19 18:15 lsmod
-rwx------ 1 root     root    9620 Feb 20 09:56 mbchk
-rwx------ 1 root     root   30136 Feb 19 20:40 mkdir
-rwx------ 1 root     root   25980 Feb 19 20:40 mkfifo
-rwx------ 1 root     root   30144 Feb 19 20:40 mknod
-rwx------ 1 root     root   34308 Feb 19 20:40 mktemp
-rwx------ 1 root     root   30240 Feb 19 21:11 more
-rwx------ 1 root     root   55560 Feb 19 21:11 mount
-rwx------ 1 root     root    5400 Feb 19 17:51 mountpoint
-rwx------ 1 root     root   75448 Feb 19 20:40 mv
-rwx------ 1 root     root  145316 Feb 19 18:26 nano
-rwx------ 1 root     root   96872 Feb 19 18:12 netstat
lrwxrwxrwx 1 root     root       8 Feb 19 18:12 nisdomainname -> hostname
-rwx------ 1 root     root   32856 Feb 19 21:05 passwd
lrwxrwxrwx 1 root     root      20 Feb 19 18:13 pgawk -> /usr/bin/pgawk-3.1.6
lrwxrwxrwx 1 root     root      16 Feb 19 17:51 pidof -> ../sbin/killall5
-rwx------ 1 root     root   30532 Feb 19 17:52 ping
-rwx------ 1 root     root   26360 Feb 19 17:52 ping6
-rwx------ 1 root     root   63176 Feb 19 18:27 ps
-rwx------ 1 root     root   30132 Feb 19 20:40 pwd
lrwxrwxrwx 1 root     root       4 Feb 19 18:25 rbash -> bash
-rwx------ 1 root     root    9194 Feb 19 17:52 rc-status
-rwx------ 1 root     root   34280 Feb 19 20:40 readlink
lrwxrwxrwx 1 root     root       2 Mar 13 22:18 red -> ed
-rwx------ 1 root     root   46580 Feb 19 20:40 rm
-rwx------ 1 root     root   25980 Feb 19 20:40 rmdir
lrwxrwxrwx 1 root     root       4 Feb 19 18:26 rnano -> nano
-rwx------ 1 root     root   13940 Feb 19 17:52 run-parts
-rwx------ 1 root     root   42868 Feb 19 18:02 sed
-rwx------ 1 root     root   30108 Feb 19 20:40 seq
-rwx------ 1 root     root   26492 Feb 19 20:35 setfacl
-rwx------ 1 root     root   13816 Mar 26 16:44 setfattr
-rwx------ 1 root     root   34368 Feb 19 18:11 setfont
lrwxrwxrwx 1 root     root       4 Feb 19 18:25 sh -> bash
-rwx------ 1 root     root   25988 Feb 19 20:40 sleep
-rwx------ 1 root     root   75584 Feb 19 20:40 sort
-rwx------ 1 root     root   48608 Feb 19 20:40 stty
-rwx------ 1 root     root   30940 Feb 19 21:05 su
-rwx------ 1 root     root   21876 Feb 19 20:40 sync
-rwx------ 1 root     root   46628 Feb 19 20:40 tail
-rwx------ 1 root     root  236020 Feb 19 18:14 tar
-rwx------ 1 root     root    9520 Feb 19 17:52 tempfile
-rwx------ 1 root     root   42448 Feb 19 20:40 touch
-rwx------ 1 root     root   38352 Feb 19 20:40 tr
-rwx------ 1 root     root   21868 Feb 19 20:40 true
-rwx------ 1 root     root   21884 Feb 19 20:40 tty
-rwx------ 1 root     root   38716 Feb 19 21:11 umount
-rwx------ 1 root     root   26000 Feb 19 20:40 uname
lrwxrwxrwx 1 root     root       6 Feb 19 18:11 uncompress -> gunzip
-rwx------ 1 root     root    5400 Feb 19 21:12 uuidgen
-rwx------ 1 root     root   92024 Feb 19 20:40 vdir
-rwx------ 1 root     root   34280 Feb 19 20:40 wc
-rwx------ 1 root     root   21876 Feb 19 20:40 yes
lrwxrwxrwx 1 root     root       8 Feb 19 18:12 ypdomainname -> hostname
-rwx------ 1 root     root      66 Feb 19 18:11 zcat
d2b bin #

Code:
directory /sbin


d2b sbin # ls -l
total 4976
-rwx------ 1 root root  51166 Feb 19 17:52 MAKEDEV
-rwx------ 1 root root  18236 Feb 19 21:11 agetty
-rwx------ 1 root root  44884 Feb 19 18:12 arp
-rwx------ 1 root root  13700 Feb 19 17:52 arping
-rwx------ 1 root root  21944 Feb 19 21:12 badblocks
-rwx------ 1 root root  13704 Feb 19 21:12 blkid
-rwx------ 1 root root   9952 Feb 19 21:11 blockdev
-rwx------ 1 root root  13892 Feb 19 17:51 bootlogd
-rwx------ 1 root root  56148 Feb 19 21:11 cfdisk
-rwx------ 1 root root   5392 Feb 19 17:51 change_console
-rwx------ 1 root root   5364 Feb 19 17:52 consoletype
-rwx------ 1 root root   5388 Feb 19 21:11 ctrlaltdel
-rwx------ 1 root root  69916 Feb 19 21:12 debugfs
-rwx------ 1 root root  46988 Feb 19 18:15 depmod
-rwx------ 1 root root   3241 Feb 19 17:52 depscan.sh
-rwx------ 1 root root 346304 Mar 15 20:20 dhclient
-rwx------ 1 root root   7686 Mar 15 20:20 dhclient-script
-rwx------ 1 root root  13680 Feb 19 21:12 dumpe2fs
-rwx------ 1 root root 164200 Feb 19 21:12 e2fsck
-rwx------ 1 root root  13724 Feb 19 21:12 e2image
lrwxrwxrwx 1 root root      7 Feb 19 21:12 e2label -> tune2fs
-rwx------ 1 root root   9580 Feb 19 21:12 e2undo
-rwx------ 1 root root    699 Feb 19 17:52 env-update.sh
-rwx------ 1 root root  84756 Feb 19 21:11 fdisk
-rwx------ 1 root root   9556 Feb 19 21:12 filefrag
lrwxrwxrwx 1 root root      7 Feb 19 21:12 findfs -> tune2fs
-rwx------ 1 root root   1735 Feb 19 19:00 fix_libtool_files.sh
-rwx------ 1 root root  22128 Feb 19 21:12 fsck
-rwx------ 1 root root   9540 Feb 19 21:11 fsck.cramfs
lrwxrwxrwx 1 root root      6 Feb 19 21:12 fsck.ext2 -> e2fsck
lrwxrwxrwx 1 root root      6 Feb 19 21:12 fsck.ext3 -> e2fsck
lrwxrwxrwx 1 root root      6 Feb 19 21:12 fsck.ext4 -> e2fsck
lrwxrwxrwx 1 root root      6 Feb 19 21:12 fsck.ext4dev -> e2fsck
-rwx------ 1 root root  25984 Feb 19 21:11 fsck.minix
-rwx------ 1 root root  19194 Feb 19 17:52 functions.sh
-rwx------ 1 root root   9508 Feb 19 18:15 generate-modprobe.conf
-rwx------ 1 root root 135976 Feb 20 09:56 grub
-rwx------ 1 root root  13312 Feb 20 09:56 grub-install
-rwx------ 1 root root   2304 Feb 20 09:56 grub-md5-crypt
-rwx------ 1 root root   2533 Feb 20 09:56 grub-set-default
-rwx------ 1 root root   2473 Feb 20 09:56 grub-terminfo
-rwx------ 1 root root  13712 Feb 19 17:51 halt
-rwx------ 1 root root  30164 Feb 19 21:11 hwclock
-rwx------ 1 root root  61512 Feb 19 18:12 ifconfig
-rwx------ 1 root root  35000 Feb 19 17:51 init
-rwx------ 1 root root   9556 Feb 19 18:15 insmod
-rwx------ 1 root root 474004 Feb 19 18:15 insmod.static
-rwx------ 1 root root   1542 Feb 19 17:52 installkernel
-rwx------ 1 root root  47116 Feb 20 01:14 ip6tables
-rwx------ 1 root root  55340 Feb 20 01:14 ip6tables-multi
-rwx------ 1 root root  51244 Feb 20 01:14 ip6tables-restore
-rwx------ 1 root root  47148 Feb 20 01:14 ip6tables-save
-rwx------ 1 root root 205196 Feb 20 01:14 ip6tables-static
-rwx------ 1 root root  13660 Feb 19 18:12 ipmaddr
-rwx------ 1 root root  47132 Feb 20 01:14 iptables
-rwx------ 1 root root  59516 Feb 20 01:14 iptables-multi
-rwx------ 1 root root  51260 Feb 20 01:14 iptables-restore
-rwx------ 1 root root  47164 Feb 20 01:14 iptables-save
-rwx------ 1 root root 230892 Feb 20 01:14 iptables-static
-rwx------ 1 root root  17760 Feb 19 18:12 iptunnel
-rwx------ 1 root root  13700 Feb 19 17:51 killall5
-rwx------ 1 root root 625856 Mar 26 17:33 ldconfig
-rwx------ 1 root root   9560 Feb 19 21:12 logsave
-rwx------ 1 root root  21916 Feb 19 21:11 losetup
lrwxrwxrwx 1 root root     12 Feb 19 18:15 lsmod -> ../bin/lsmod
-rwx------ 1 root root  13988 Feb 19 18:12 mii-tool
-rwx------ 1 root root  50908 Feb 19 21:12 mke2fs
-rwx------ 1 root root   5416 Feb 19 21:11 mkfs
-rwx------ 1 root root   9528 Feb 19 21:11 mkfs.bfs
-rwx------ 1 root root  17776 Feb 19 21:11 mkfs.cramfs
lrwxrwxrwx 1 root root      6 Feb 19 21:12 mkfs.ext2 -> mke2fs
lrwxrwxrwx 1 root root      6 Feb 19 21:12 mkfs.ext3 -> mke2fs
lrwxrwxrwx 1 root root      6 Feb 19 21:12 mkfs.ext4 -> mke2fs
lrwxrwxrwx 1 root root      6 Feb 19 21:12 mkfs.ext4dev -> mke2fs
-rwx------ 1 root root  18928 Feb 19 21:11 mkfs.minix
-rwx------ 1 root root  13748 Feb 19 21:11 mkswap
-rwx------ 1 root root  13876 Feb 19 18:15 modinfo
-rwx------ 1 root root  34772 Feb 19 18:15 modprobe
lrwxrwxrwx 1 root root     19 Apr  7 19:10 mount.smbfs -> ../usr/bin/smbmount
-rwx------ 1 root root   9684 Feb 19 18:12 nameif
-rwx------ 1 root root   5376 Feb 19 21:05 nologin
-rwx------ 1 root root   9540 Mar 26 18:35 pam_tally
-rwx------ 1 root root   5364 Feb 19 21:11 pivot_root
-rwx------ 1 root root   5420 Feb 19 18:12 plipconfig
lrwxrwxrwx 1 root root      4 Feb 19 17:51 poweroff -> halt
-rwx------ 1 root root  23604 Feb 19 18:12 rarp
-rwx------ 1 root root   9492 Feb 19 21:11 raw
-rwx------ 1 root root  23436 Feb 19 17:52 rc
-rwx------ 1 root root   5546 Feb 19 17:52 rc-update
lrwxrwxrwx 1 root root      4 Feb 19 17:51 reboot -> halt
-rwx------ 1 root root  34408 Feb 19 21:12 resize2fs
-rwx------ 1 root root   9748 Feb 19 18:15 rmmod
-rwx------ 1 root root  48048 Feb 19 18:12 route
-rwx------ 1 root root   5380 Feb 19 17:51 runlevel
-rwx------ 1 root root  21884 Feb 19 17:52 runscript
-rwx------ 1 root root  19086 Feb 19 17:52 runscript.sh
lrwxrwxrwx 1 root root     19 Feb 19 17:53 scsi_id -> ../lib/udev/scsi_id
-rwx------ 1 root root  51668 Feb 19 21:11 sfdisk
-rwx------ 1 root root  17952 Feb 19 17:51 shutdown
-rwx------ 1 root root  27636 Feb 19 18:12 slattach
-rwx------ 1 root root 490388 Mar 26 17:33 sln
-rwx------ 1 root root  18324 Feb 19 17:52 start-stop-daemon
-rwx------ 1 root root  13728 Feb 19 17:51 sulogin
lrwxrwxrwx 1 root root      6 Feb 19 21:11 swapoff -> swapon
-rwx------ 1 root root  18036 Feb 19 21:11 swapon
-rwx------ 1 root root   9552 Feb 19 18:27 sysctl
lrwxrwxrwx 1 root root      4 Feb 19 17:51 telinit -> init
-rwx------ 1 root root  34396 Feb 19 21:12 tune2fs
-rwx------ 1 root root  87684 Feb 19 17:52 udevadm
-rwx------ 1 root root  79512 Feb 19 17:52 udevd
lrwxrwxrwx 1 root root      7 Feb 19 17:53 udevsettle -> udevadm
-rwx------ 1 root root  26072 Mar 26 18:35 unix_chkpwd
-rwx------ 1 root root  26060 Mar 26 18:35 unix_update
-rwx------ 1 root root  10519 Feb 19 18:15 update-modules
lrwxrwxrwx 1 root root      9 Feb 19 17:52 update-rc -> rc-update
-rwx------ 1 root root  13724 Feb 19 21:12 uuidd
lrwxrwxrwx 1 root root     18 Feb 19 17:53 vol_id -> ../lib/udev/vol_id
d2b sbin #

Code:
directory /usr

d2b usr # ls -l
total 84
drwx------   2 root    root    20480 Apr 10 17:41 bin
drwx------   4 root    root     4096 Jun 19  2008 i486-pc-linux-gnu
drwx------   6 root    root     4096 Jun 19  2008 i686-pc-linux-gnu
drwx------  64 root    root    12288 Apr  7 19:10 include
drwx------  22 root    root    20480 Apr 10 17:41 lib
drwx------   4 root    root     4096 Feb 20 00:57 libexec
drwx------   8 root    root     4096 Jun 11  2008 local
drwxr-xr-x 162 portage portage  4096 Apr  9 23:08 portage
drwx------   2 root    root     4096 Apr  7 19:10 sbin
drwx------  54 root    root     4096 Mar 26 16:56 share
drwx------   3 root    root     4096 Feb 20 01:12 src
lrwxrwxrwx   1 root    root        8 Feb 19 17:06 tmp -> /var/tmp
d2b usr #

ho notato che sono tutti settati con proprietario e gruppo root, può centrare qualcosa questo con tutte i permessi errati che ho riscontrato? Vi ripeto se vi serve qualche altro output sono a vostra disposizione non preoccupatevi. Vi ringrazio moltissimo per l'aiuto che mi state dando.


EDIT: ho controllato sull'altra mia macchina gentoo che ha l'installazione da poco ultimata e i permessi sono molto diversi. Però vorrei far si che le directory che devono essere sicure siano in effetti di proprietà root e eseguibili solo da lui, e che le altre (che devono essere comunque eseguibili da tutti) abbiano dei permessi giusti per le loro funzioni. Al momento posso anche perderci tutta la nottata a copiare i permessi da una macchina all'altra ma vorrei sapere quali directory principali del sistema posso tenere con i permessi che voglio senza incappare in questi errori. Vi ringrazio ancora
Back to top
View user's profile Send private message
Ic3M4n
Advocate
Advocate


Joined: 02 Nov 2004
Posts: 3489
Location: Bergamo.

PostPosted: Sat Apr 11, 2009 9:16 pm    Post subject: Reply with quote

beh... si, direi che hai tutti i permessi scazzati. almeno la r dovrebbe esistere per tutti su /usr/bin come su molte altre dir. di sicuro sul pc che sto usando adesso è così. il tuo sembra un sistema mono utente. nessuno oltre a root può fare niente.
Back to top
View user's profile Send private message
GoraNz
Apprentice
Apprentice


Joined: 27 Jul 2008
Posts: 181
Location: Latina, Pisa

PostPosted: Sun Apr 12, 2009 12:18 am    Post subject: Reply with quote

ok allora adesso mi metto a ristabilirle tutte di default facendo la "copia" dei permessi da una macchina all'altra ma volevo sapere quali directory, oltre alla /home e alle sue derivate, posso gestire a modo mio con restrizioni ecc senza provocare danni al sistema. Potete dirmi quali sono? grazie ancora

EDIT: e tanti auguri di buona pasqua a tutti :D
Back to top
View user's profile Send private message
GoraNz
Apprentice
Apprentice


Joined: 27 Jul 2008
Posts: 181
Location: Latina, Pisa

PostPosted: Sun Apr 12, 2009 7:45 pm    Post subject: Reply with quote

raga, ho provato a ripristinare i permessi, ma non credo sia una cosa fattibile: dovrei fare un lavoro file per file ed è veramente pesante e umanamente impossibile credo :( ho letto che l'unico modo per ripristinarli (oltre a quello a mano) è installare un nuovo stage3. é possibile farlo con una macchina che, come la mia, ha gia un'installazione completata? grazie ragazzi dell'aiuto vi ringrazio ancora. ciao a tutti
Back to top
View user's profile Send private message
cloc3
Advocate
Advocate


Joined: 13 Jan 2004
Posts: 4795
Location: http://www.gentoo-users.org/user/cloc3/

PostPosted: Sun Apr 12, 2009 9:57 pm    Post subject: Reply with quote

GoraNz wrote:
installare un nuovo stage3. é possibile farlo con una macchina che, come la mia, ha gia un'installazione completata?

si .
crei una partizione vuota ed esegui l'installazione come da manuale.

alla fine avrai il problema di fare login dentro la nuova partizione, che ovviamente non è root.
qui, o crei una initrd ad hoc che ti permetta di fare un primo login, oppure riavvi con un cdrom esterno ed esegui le cancellature dei file vecchi e gli spostamenti di quelli nuovi.
_________________
vu vu vu
gentù
mi piaci tu
Back to top
View user's profile Send private message
GoraNz
Apprentice
Apprentice


Joined: 27 Jul 2008
Posts: 181
Location: Latina, Pisa

PostPosted: Sun Apr 12, 2009 10:55 pm    Post subject: Reply with quote

non è possibile più semplicemente riscaricare lo stage nella stessa partizione riscompattare e riemergere il sistema? anche se credo questo diventi una pseudo-formattazione vero? in entrambi i modi mi ritroverei con i programmi da riconfigurare quindi penso che a questo punto seguo la via dei permessi a mano-_- grazie comunque della risposta
Back to top
View user's profile Send private message
cloc3
Advocate
Advocate


Joined: 13 Jan 2004
Posts: 4795
Location: http://www.gentoo-users.org/user/cloc3/

PostPosted: Tue Apr 14, 2009 7:04 am    Post subject: Reply with quote

GoraNz wrote:
non è possibile più semplicemente riscaricare lo stage nella stessa partizione riscompattare e riemergere il sistema?

si.
scusa, ho sbagliato il termine.
intendevo una cartella vuota ed indipendente. se avessi voluto parlare di partizione, non avrei dovuto accennare alla complicazione per il login.
utilizzare una partizione vergine sarebbe meglio. ma mi pare di capire che tu non ne abbia una a disposizione.

non esiste il problema della pseudo formattazione. Devi solo evitare di sovrascrivere l'installazione attuale.
in pratica, il comando tar per scompattare lo stage, va lanciato con l'opzione -C /percorso-cartella-nuova-gentoo.
non provare assolutamente a scompattare lo stage nella cartella radice, altrimenti produci un sistema incoerente e non controllabile.
_________________
vu vu vu
gentù
mi piaci tu
Back to top
View user's profile Send private message
GoraNz
Apprentice
Apprentice


Joined: 27 Jul 2008
Posts: 181
Location: Latina, Pisa

PostPosted: Tue Apr 14, 2009 1:50 pm    Post subject: Reply with quote

allora scusami un secondo, vorrei ricapitolare: se io creo una nuova cartella e ripratico la scompattazione mi reinstalla un nuovo sistema diciamo, su cui poi dovrò rilanciare sempre i soliti comandi dell'installazione (es. emerge -e system ecc.). Dopo di che dovrò praticare la copia, ma in questo passaggio devo cancellare tutto ciò che c'è in /, oppure pratico la copia col -C come dicevi prima? e in sostanza questo -C mi permette di mantenere tutta la mappa degli user che sono ora presenti nel sistema oppure perdo tutto? per tutto intendo configurazioni dei demoni, file delle varie home, e tutto ciò che è legato a questo, che vorrei salvare per evitare di risettare tutto. è un server abbastanza importante e primario, come ho gia detto, quindi vorrei impiegare al massimo 1 giorno per rimetterlo up e funzionante. Grazie comunque della risposta.




EDIT: nel frattempo ho cambiato il titolo del theard per aggiornarlo al problema che è sorto.
Back to top
View user's profile Send private message
cloc3
Advocate
Advocate


Joined: 13 Jan 2004
Posts: 4795
Location: http://www.gentoo-users.org/user/cloc3/

PostPosted: Tue Apr 14, 2009 2:29 pm    Post subject: Reply with quote

GoraNz wrote:
allora scusami un secondo, vorrei ricapitolare: se ... su cui poi ... Dopo di che ... ma ... oppure ... e in sostanza ... perdo tutto? ...

:)

hai proprio ragione, prima di partire in questa operazione è bene chiarirsi un po' le idee su cosa accade durante un'installazione.
prima di tutto, il comando tar è ben documentato nelle manpages (man tar).
il comando tar tjf <tarball.tar.bz2> ti permette di vedere il contenuto dei file che vuoi installare prima di estrarli.
se utilizzi l'opzione -C forzi l'installazione di quei file in una cartella di tua scelta, che deve essere una cartella vuota, preferenzialmente montata su una partizione vergine (ma tu probabilmente non ne hai nessuna).

se invece non usi l'opzione -C rischi di estrarre il tarball in un posto sbagliato. se utilizzi ad esempio -C / lo estrai nella cartella di root attuale e ti fai un danno non reversibile. tra l'altro, credo proprio che sovrascrivi i file /etc/passwd /etc/shadow ed /etc/group che gestiscono gli utenti del sistema.
in più alteri la configurazione complessiva del tuo sistema attuale, senza registrare le modifiche nei database della tua installazione locale, che, se usato correttamente, tiene traccia di ogni intervento di emerge nel tuo sistema.

non crei, al contrario, un rischio per i dati utente, che sono ben protetti nella cartella /home (a proposito, è sempre consigliabile riservare una partizione separata per le cartelle dati!).
Se tu scompatti il tarball del nuovo sistema in una cartella, ci fai chroot e lo ricompili secondo le indicazioni di manuale, come se stessi facendo una nuova installazione da cdrom, generi un nuovo sistema autonomo perfettamente affidabile. a quel punto, avrai il problema di recuperare gli utenti, ripristinare le impostazioni di sistema (cartella /etc) e di farci login dentro. sono entrambi problemi facili da risolvere, ma ti consiglio di affrontarli successivamente, magari con un nuovo post, separato da questo.

p.s.: 1 giorno può essere poco per rimettere in piedi una macchina corente, soprattutto avendo incertezze tecniche sui meccanismi di installazione.
la fretta è madre degli sbagli peggiori.
gentoo va capita un poco al giorno. se hai premura, affidati ad una distro precompilata, ma tenendo presente la massima qui sopra.
_________________
vu vu vu
gentù
mi piaci tu
Back to top
View user's profile Send private message
GoraNz
Apprentice
Apprentice


Joined: 27 Jul 2008
Posts: 181
Location: Latina, Pisa

PostPosted: Tue Apr 14, 2009 2:40 pm    Post subject: Reply with quote

ti ringrazio sei stato molto chiaro e cercherò di prendermi del tempo per farlo allora. Ultime cose, poi non rompo piu e cerco di agire xD per primo volevo sapere se la cosa la si può fare senza l'uso del cdrom di installazione o se si può anche tramite ssh volendo; poi volevo anche sapere se in un secondo momento sia comunque possibile ristabilire il tutto nella cartella /, giusto per sapere se è una cosa fattibile, poi quando sarà aprerò un nuovo post per chiedere info; poi un'ultima cosa: naturalmente è come se rifacessi una nuova installazione quindi oltre allo stage dovrò scaricare lo snapshot e ricompilare un nuovo kernel giusto? grazie comunque per tutto vi farò sapere
Back to top
View user's profile Send private message
cloc3
Advocate
Advocate


Joined: 13 Jan 2004
Posts: 4795
Location: http://www.gentoo-users.org/user/cloc3/

PostPosted: Tue Apr 14, 2009 6:41 pm    Post subject: Reply with quote

GoraNz wrote:
per primo volevo sapere se la cosa la si può fare senza l'uso del cdrom di installazione

si. ti sto appunto suggerendo di utilizzare l'installazione attuale, quella semicorrotta, per svolgere le funzioni provvisorie del cdrom.
GoraNz wrote:

o se si può anche tramite ssh volendo;

non capisco esattamente cosa intendi. esistono tecniche di installazione che utilizzano macchine remote in vari modi. un esempio lo trovi con un ricerca sul forum di documentazione alla voce portatile felice. ma probabilmente ti riferisci semplicemente all'uso di una shell locale con accesso da remoto. in questo la risposta è si, ma solo perché la shell è locale. il fatto che sia un ssh da remoto è ininfluente.
GoraNz wrote:

poi volevo anche sapere se in un secondo momento sia comunque possibile ristabilire il tutto nella cartella /

certo. si può fare in vari modi. il più semplice (anche se meno affascinante) è un accesso da cdrom.
GoraNz wrote:
naturalmente è come se rifacessi una nuova installazione quindi oltre allo stage dovrò scaricare lo snapshot e ricompilare un nuovo kernel giusto?

come preferisci. hai già scaricato un portage piuttosto aggiornato in locale. puoi usare quello. Come puoi utilizzare i distfiles che possiedi attualmente.
stessa cosa per il kernel.
se preferisci ricompilarlo, salva il precedente file .config come partenza per la nuova configurazione.
_________________
vu vu vu
gentù
mi piaci tu
Back to top
View user's profile Send private message
GoraNz
Apprentice
Apprentice


Joined: 27 Jul 2008
Posts: 181
Location: Latina, Pisa

PostPosted: Wed Apr 15, 2009 3:40 pm    Post subject: Reply with quote

ti ringrazio, mi sei stato molto d'aiuto. Ora cercherò di avviare questa nuova installazione del sistema e poi ci risentiremo per vedere come posso risistemare i file nella directory principale / . Vi ringrazio ancora per il vostro aiuto, taggo questo topic come risolto. A presto!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian) All times are GMT
Page 1 of 1

 
Jump to:  
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
You cannot vote in polls in this forum