Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Risolto] /etc/mtab: mantenere symlink invece del file reale
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
guerro
Guru
Guru


Joined: 21 Jun 2004
Posts: 402
Location: Brescia

PostPosted: Wed Jun 06, 2018 11:27 am    Post subject: [Risolto] /etc/mtab: mantenere symlink invece del file reale Reply with quote

Ciao a tutti,
mi capita questa stranezza e vorrei avere conferma se capita anche a voi:

  • Ho censito in fstab i mount point relativi a condivisioni nfs sul mio NAS;
  • I mount point vengono correttamente visualizzati nella barra laterale sinistra di dolphin;
  • quando però faccio doppio click per aprire la condivisione dolphin non mi fa accedere anche se è stata correttamente mountata (verificato lanciando il comando "mount" da console e accedendovi, sempre da console);
  • l'unico modo per accedere è selezionare la voce "radice", quindi la cartella "mnt" e successivamente la cartella che funge da mount-point.


Facendo questo giro tra l'altro dolphin passa dall'evidenziare la voce "radice" a quella relativa alla condivisione di rete.

A qualcun'altro capita la stessa cosa?

Tra l'altro, ma non so se dipende dallo stesso motivo, quando monto una pennina USB formattata NTFS da 64GB, dolphin mi dice che ho sempre 3.1GB liberi e quando tento di copiare un file da 8GB mi dice che lo spazio è esaurito, peccato che ne abbia almeno 30GB. La cosa fila liscia se invece da console, tramite Midnightcommander faccio la stessa operazione di copiatura.

[EDIT]
Cambiato il titolo da "Dolphin e nfs4.x mount point" a "/etc/mtab: mantenere symlink invece del file reale"
in quanto il problema sembra dovuto al fatto che il link simbolico creato nel boot-runleve venga sostituito ogni volta con un file reale
_________________
(.(*. .*).)
.. G u e r r o ..
(.(.* *.).)


Last edited by guerro on Fri Jun 15, 2018 7:54 am; edited 3 times in total
Back to top
View user's profile Send private message
sabayonino
Veteran
Veteran


Joined: 03 Jan 2012
Posts: 1014

PostPosted: Wed Jun 06, 2018 10:21 pm    Post subject: Reply with quote

aggiungi l'opzione "user" nella riga del mount , vedrai che poi sior delfno te lo monta anche da utente indipedentemente di chi sia il proprietario della cartella
_________________
LRS i586 on G.Drive
LRS x86-64 EFI on MEGA
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30915
Location: here

PostPosted: Thu Jun 07, 2018 5:43 am    Post subject: Reply with quote

sabayonino wrote:
aggiungi l'opzione "user" nella riga del mount , vedrai che poi sior delfno te lo monta anche da utente indipedentemente di chi sia il proprietario della cartella

Sicuro che non sia legato al fatto che hanno tolto la permission suid a /sbin/mount.cifs?
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
guerro
Guru
Guru


Joined: 21 Jun 2004
Posts: 402
Location: Brescia

PostPosted: Thu Jun 07, 2018 7:14 am    Post subject: Reply with quote

sabayonino wrote:
aggiungi l'opzione "user" nella riga del mount , vedrai che poi sior delfno te lo monta anche da utente indipedentemente di chi sia il proprietario della cartella


L'opzione user è già presente, infatti prima funzionava tutto correttamente, aggiungo anche che non è l'operazione di mount di per sè che non funziona infatti come detto facendo doppio click sull'unità di rete in dolphin, questa viene montata, ma dolphin dice il contrario e non mi fa accedere direttamente, l'unico modo è (sempre con dolphin) passare dalla "radice" > mnt > [cartella di mount point]

A conferma dalla console se lancio il comando "mount" vedo che la condivisione di rete è stata montata dallo "user"

Aggiungo in fine che se mi loggo in KDE come user, tutto funziona come una alla perfezione

EDIT:
mi se mi loggo come utente "root", tutto funziona alla perfezione.
la mia utenza appartiele al gruppo "wheel" per fare escalation, ma NON E' l'utente "root" :wink:
_________________
(.(*. .*).)
.. G u e r r o ..
(.(.* *.).)


Last edited by guerro on Thu Jun 07, 2018 2:42 pm; edited 2 times in total
Back to top
View user's profile Send private message
sabayonino
Veteran
Veteran


Joined: 03 Jan 2012
Posts: 1014

PostPosted: Thu Jun 07, 2018 10:23 am    Post subject: Reply with quote

guerro wrote:


Aggiungo in fine che se mi loggo in KDE come user, tutto funziona come una alla perfezione


Quindi presumo che il login lo fai da utente root 8O

Sbaglio o era stato deprecato molto tempo fa ?
_________________
LRS i586 on G.Drive
LRS x86-64 EFI on MEGA
Back to top
View user's profile Send private message
guerro
Guru
Guru


Joined: 21 Jun 2004
Posts: 402
Location: Brescia

PostPosted: Thu Jun 07, 2018 2:49 pm    Post subject: Reply with quote

Giusto una domanda....
Ma a qualcuno di voi funziona tutto regolarmente? In caso potreste postare la riga del vostro fstab? Magari è solo una questione di optioni :D :D
_________________
(.(*. .*).)
.. G u e r r o ..
(.(.* *.).)
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30915
Location: here

PostPosted: Thu Jun 07, 2018 3:09 pm    Post subject: Reply with quote

Il problema e', per questioni di sicurezza, la rimozione del setuid da /sbin/mount.cifs. Infatti se provo a montare qualcosa da user ho il seguente errore
Code:
$ mount /mnt/shared_folder/
This program is not installed setuid root -  "user" CIFS mounts not supported.

Puoi comunque settar il suid con il comando
Code:
# chmod u+s /sbin/mount.cifs

Infatti dopo avere installato il pacchetto net-fs/cifs-utils dovresti vedere il seguente messaggio
Code:
setuid use flag was dropped due to multiple security implications
such as CVE-2009-2948, CVE-2011-3585 and CVE-2012-1586
You are free to set setuid flags by yourself

_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
guerro
Guru
Guru


Joined: 21 Jun 2004
Posts: 402
Location: Brescia

PostPosted: Thu Jun 07, 2018 4:41 pm    Post subject: Reply with quote

scusate un secondo....
ma perchè state parlando di CIFS e non di NFS?

anche il pacchetto dovrebbe essere nfs-utils, e il comando mount.nfs

Questa è la riga in fstab in cui ho dichiarato la condivisione da montare:
Code:

nas2016-1.intranet.local:/Archivi/claudio   /mnt/Archivi      nfs4      noauto,defaults,user      0 0

_________________
(.(*. .*).)
.. G u e r r o ..
(.(.* *.).)
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30915
Location: here

PostPosted: Thu Jun 07, 2018 5:08 pm    Post subject: Reply with quote

guerro wrote:
scusate un secondo....
ma perchè state parlando di CIFS e non di NFS?

Perche' mi sono messo in mente che stavi montando una cartella condivisa windows. Scusa.

Ok partiamo dal principio cosa succede se la monti da utente (command line)?
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
guerro
Guru
Guru


Joined: 21 Jun 2004
Posts: 402
Location: Brescia

PostPosted: Thu Jun 07, 2018 5:15 pm    Post subject: Reply with quote

come detto, da command line è tutto perfetto: monta e posso accedere senza problemi.

Il problema è tutto e solo di DOLPHIN, che su doppio-click nella barra di sinistra in cui sono elencate le condivisioni (che mostra scollegate) esegue il mount, ma il device continua ad essere mostrato come scollegato e quindi nel riquadro di destra non mostra il contenuto della condivisione su cui ho fatto doppio-click.
_________________
(.(*. .*).)
.. G u e r r o ..
(.(.* *.).)
Back to top
View user's profile Send private message
sabayonino
Veteran
Veteran


Joined: 03 Jan 2012
Posts: 1014

PostPosted: Thu Jun 07, 2018 5:37 pm    Post subject: Reply with quote

Per il NAS a mia disposizione non ho problemi di montaggio (niente opzione "user") . Ho solo alcune opzioni forzate per la versione di nfs utilizzata dal NAS e per la rete (timeout e menate varie)


Code:
192.168.0.90:/nfs/Backup/pc-dell   /home/saba/nas/backup nfs      nfsvers=3,rw,nolock,noatime,nodiratime,async,timeo=10 0 0


Prova a controllare lato NAS se ci sono dei limiti sui permessi a cui dolphin magari soffre un pò
_________________
LRS i586 on G.Drive
LRS x86-64 EFI on MEGA
Back to top
View user's profile Send private message
guerro
Guru
Guru


Joined: 21 Jun 2004
Posts: 402
Location: Brescia

PostPosted: Thu Jun 07, 2018 5:52 pm    Post subject: Reply with quote

vedo che tu utilizzi la versione 3 di nfs, io la 4.1.....
non sarà mica che dolphin ha problemi con la 4.x???

Adesso che ci penso ho cominciato ad avere questo problema qualche aggiornamento fa, credo anche quando sono passato tutto a nfs4.x
Questo spiegherebbe perchè sostanzialmente il sistema funziona... ed è solo dolphin che ha questo problema...
_________________
(.(*. .*).)
.. G u e r r o ..
(.(.* *.).)
Back to top
View user's profile Send private message
sabayonino
Veteran
Veteran


Joined: 03 Jan 2012
Posts: 1014

PostPosted: Thu Jun 07, 2018 7:36 pm    Post subject: Reply with quote

è il NAS (quello mio) che non supporta la 4.x

per quello che ti dico di controllare le impostazioni NFS sul NAS
_________________
LRS i586 on G.Drive
LRS x86-64 EFI on MEGA
Back to top
View user's profile Send private message
guerro
Guru
Guru


Joined: 21 Jun 2004
Posts: 402
Location: Brescia

PostPosted: Thu Jun 07, 2018 7:56 pm    Post subject: Reply with quote

Il mio nas della qnap supporta la 4.x
Se fosse come dici avrei problemi sia con Dolphin che da console....
Invece è solo Dolphin.... mi sto convincendo sempre più che il problema c’è l’abbia proprio dolphin.
Nessuno ha esperienze positive con Dolphin e nfs4.x??? Giusto per fugare il dubbio di incompatibilità tra i due ????????
_________________
(.(*. .*).)
.. G u e r r o ..
(.(.* *.).)
Back to top
View user's profile Send private message
guerro
Guru
Guru


Joined: 21 Jun 2004
Posts: 402
Location: Brescia

PostPosted: Tue Jun 12, 2018 10:22 pm    Post subject: Reply with quote

FINALMENTE CAPITOOOO!!!!!!

Il problema è dovuto tutto al fatto che il file /etc/mtab NON E' UN LINK SIMBOLICO a /proc/self/mounts.
La cosa strana è che il link dovrebbe essere creato quando viene eseguito nel runlevel di boot il file /etc/initd/mtab. Sospetto che il link venga creato, ma poi c'è qualcosa che lo sostituisce nuovamente con un file reale che non viene mai aggiornato.

Il vostro /etc/mtab come è??
_________________
(.(*. .*).)
.. G u e r r o ..
(.(.* *.).)
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30915
Location: here

PostPosted: Wed Jun 13, 2018 6:02 am    Post subject: Reply with quote

Code:
$ ls -l /etc/mtab
lrwxrwxrwx 1 root root 17 Jun 12 07:48 /etc/mtab -> /proc/self/mounts

_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
guerro
Guru
Guru


Joined: 21 Jun 2004
Posts: 402
Location: Brescia

PostPosted: Wed Jun 13, 2018 6:47 am    Post subject: Reply with quote

Ho visto che lo script /etc/init.d/mtab eseguito al boot crea il link, ma poi cìè qualcosa che successivamente sostituisce il link con un file fisico..... voglio capire chi e quando esegue il secondo passaggio. Deve essere qualcosa nel default runlevel perchè ho provato a spostare l'mtab dal boot-runlevel al default-runlevel, ma il risultato non cambia.

Qualcuno ha qualche suggerimento?
_________________
(.(*. .*).)
.. G u e r r o ..
(.(.* *.).)
Back to top
View user's profile Send private message
sabayonino
Veteran
Veteran


Joined: 03 Jan 2012
Posts: 1014

PostPosted: Wed Jun 13, 2018 5:22 pm    Post subject: Reply with quote

Code:
# rc-show


per vedere i servizi attivi nei vari run-level
_________________
LRS i586 on G.Drive
LRS x86-64 EFI on MEGA
Back to top
View user's profile Send private message
guerro
Guru
Guru


Joined: 21 Jun 2004
Posts: 402
Location: Brescia

PostPosted: Thu Jun 14, 2018 5:12 am    Post subject: Reply with quote

sabayonino wrote:
Code:
# rc-show


per vedere i servizi attivi nei vari run-level


Mi da "Comando non trovato"....
_________________
(.(*. .*).)
.. G u e r r o ..
(.(.* *.).)
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30915
Location: here

PostPosted: Thu Jun 14, 2018 5:57 am    Post subject: Reply with quote

guerro wrote:
Mi da "Comando non trovato"....

Prova con rc-update -v show
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
guerro
Guru
Guru


Joined: 21 Jun 2004
Posts: 402
Location: Brescia

PostPosted: Thu Jun 14, 2018 9:48 am    Post subject: Reply with quote

Questa sera provo a confrontare con quel comando il mio server con il client e vedere cosa viene eseguito dopo mtab (magari provando già a spostarlo dal boot al default giusto per smarcare un po di voci dalla lista 8) )
_________________
(.(*. .*).)
.. G u e r r o ..
(.(.* *.).)
Back to top
View user's profile Send private message
sabayonino
Veteran
Veteran


Joined: 03 Jan 2012
Posts: 1014

PostPosted: Thu Jun 14, 2018 10:02 am    Post subject: Reply with quote

@guerro : si scusa mi sono perso un pezzo del comando

Code:
rc-update show

_________________
LRS i586 on G.Drive
LRS x86-64 EFI on MEGA
Back to top
View user's profile Send private message
guerro
Guru
Guru


Joined: 21 Jun 2004
Posts: 402
Location: Brescia

PostPosted: Thu Jun 14, 2018 5:45 pm    Post subject: Reply with quote

Purtroppo con il comando suggerito non ho risolto nulla...
in compenso ho scoperto che potrebbe essere FUSE che crea problemi: ho provato a creare il link manualmente e a cancellare il file mtab.fuselock.... e quando ho riavviato il file mtab è ritornato ad essere un file fisico e il file mtab.fuselock è ricomparso.
Se può essere d'aiuto a qualcuno per aiutarni a chiarire il mistero posto l'output del comando:
Code:

       NetworkManager |      default                           
                acpid | boot default                           
               agetty |                                       
            alsasound |                                       
              apcupsd |      default                           
    apcupsd.powerfail |                                       
         avahi-daemon |      default                           
       avahi-dnsconfd |                                       
            bacula-fd |      default                           
               binfmt | boot                                   
            bluetooth |                                       
             bootmisc | boot                                   
        busybox-klogd |                                       
         busybox-ntpd |                                       
      busybox-syslogd |                                       
     busybox-watchdog |                                       
       calibre-server |                                       
          consolefont |                                       
           consolekit |      default                           
             cpupower |                                       
               cronie |      default                           
         cups-browsed |                                       
                cupsd |      default                           
                 dbus |      default                           
                devfs |                                 sysinit
        device-mapper |                                       
               dhcpcd |                                       
                dhcpd |                                       
             dhcrelay |                                       
            dhcrelay6 |                                       
              dmcrypt |                                       
                dmesg |                                 sysinit
             dmeventd |                                       
           fancontrol |                                       
           fbcondecor |      default                           
                 fsck | boot                                   
                 fuse |                                       
           git-daemon |                                                                                                                                                               
                  gpm |      default                                                                                                                                                 
    hibernate-cleanup | boot                                                                                                                                                         
             hostname | boot                                                                                                                                                         
              hwclock | boot                                                                                                                                                         
            ip6tables |                                       
             iptables |                                       
              keymaps | boot                                   
            killprocs |                        shutdown       
    kmod-static-nodes |                                 sysinit
           lm_sensors |                                       
                local |      default nonetwork                 
           localmount | boot                                   
             loopback | boot                                   
                  lvm |                                       
       lvm-monitoring |                                       
              lvmetad |                                       
      mit-krb5kadmind |                                       
          mit-krb5kdc |                                       
       mit-krb5kpropd |                                       
      mod-mono-server |                                       
              modules | boot                                   
         modules-load |                                       
             mount-ro |                        shutdown       
                 mtab | boot                                   
                mysql |      default                           
             mysql-s6 |                                       
      mysql-supervise |                                       
           net-online |                                       
        net.enp0s31f6 |                                       
               net.lo |                                       
             netmount |      default                           
                  nfs |      default                           
            nfsclient |      default                           
             nfsmount |                                       
           nullmailer |                                       
              numlock |                                       
  nvidia-persistenced |                                       
           nvidia-smi |                                       
     opentmpfiles-dev |                                 sysinit
   opentmpfiles-setup | boot                                   
              osclock |                                       
              pciparm |                                       
               procfs | boot                                   
            pydoc-2.7 |                                       
            pydoc-3.5 |                                       
                 root | boot                                   
           rpc.idmapd |                                       
           rpc.pipefs |                                       
            rpc.statd |                                       
              rpcbind |                                       
               rsyncd |                                       
             runsvdir |                                       
            s6-svscan |                                       
                samba |                                       
                saned |                                       
            savecache |                        shutdown       
                 slpd |                                       
               smartd |                                       
                 sshd |      default                           
             svnserve |                                       
                 swap | boot                                   
              swclock |                                       
               sysctl | boot                                   
                sysfs |                                 sysinit
            syslog-ng |      default                           
          teamviewerd |                                       
         termencoding | boot                                   
                 udev |                                 sysinit
          udev-settle |                                       
         udev-trigger |                                 sysinit
              urandom | boot                                   
               vmware |      default                           
        x11vnc.init.d |                                       
              xboxdrv |                                       
                  xdm |      default                           
            xdm-setup |                                       
                  xsp | 


Aggiungo anche un'estrapolazione da file rc.log in cui indica la sequenza degli script (ho provato a spostare mtab dal boot al default per ridurre l'elenco)
Code:

rc default logging started at Thu Jun 14 20:09:14 2018

 * Updating /etc/mtab ...
 * Removing /etc/mtab file
 * Creating mtab symbolic link
 [ ok ]
 * Starting dbus ...
 [ ok ]
 * Checking your configfile (/etc/syslog-ng/syslog-ng.conf) ...
 [ ok ]
 * Starting syslog-ng ...
 [ ok ]
 * Starting consolekit ...
 [ ok ]
 * Starting NetworkManager ...
 [ ok ]
Connessione in corso.....              1sConnessione in corso......             1sConnessione in corso.......            1sConnessione in corso........           1sConnessione in corso.........          1sConnessione in corso..........         1sConnessione in corso...........        1sConnessione in corso............       1sConnessione in corso.............      1sConnessione in corso..............     1sConnessione in corso...............    1sConnessione in corso...............    0s [offline]
 * Marking NetworkManager as inactive. It will automatically be marked
 * as started after a network connection has been established.
 * WARNING: NetworkManager has started, but is inactive
 * /run/apcupsd: correcting mode
 * /run/apcupsd: correcting owner
 * Starting APC UPS daemon ...
 [ ok ]
 * Starting avahi-daemon ...
 [ ok ]
 * WARNING: bacula-fd will start when NetworkManager has started
 * Starting cronie ...
 [ ok ]
 * Starting cupsd ...
 [ ok ]
 * /etc/init.d/fbcondecor uses runscript, please convert to openrc-run.
 * Setting framebuffer console images ...
 [ ok ]
 * Starting gpm ...
 [ ok ]
 * Checking mysqld configuration for mysql ...
 [ ok ]
 * Starting mysql ...
 [ ok ]
 * Starting rpcbind ...
 [ ok ]
 * Starting NFS statd ...
 [ ok ]
 * Setting up RPC pipefs ...
 [ ok ]
 * Starting idmapd ...
 [ ok ]
 * Starting NFS sm-notify ...
 [ ok ]
 * WARNING: netmount will start when NetworkManager has started
 * Mounting nfsd filesystem in /proc ...
 [ ok ]
 * Starting NFS mountd ...
 [ ok ]
 * Starting NFS daemon ...
 [ ok ]
 * Starting NFS smnotify ...
 [ ok ]
 * Starting sshd ...
 [ ok ]
 * Starting VMware USB Arbitrator ...
 [ ok ]
 * Starting VMware services ...
insmod /lib/modules/4.14.34-gentoo/misc/vmci.ko
 [ ok ]
insmod /lib/modules/4.14.34-gentoo/misc/vsock.ko
 [ ok ]
insmod /lib/modules/4.14.34-gentoo/misc/vmmon.ko
insmod /lib/modules/4.14.34-gentoo/misc/vmblock.ko
insmod /lib/modules/4.14.34-gentoo/misc/vmnet.ko
 [ ok ]
Started Bridge networking on vmnet0
Enabled hostonly virtual adapter on vmnet1
Started DHCP service on vmnet1
Started NAT service on vmnet8
Enabled hostonly virtual adapter on vmnet8
Started DHCP service on vmnet8
Started all configured services on all networks
 [ ok ]
 * Setting up sddm ...
 [ ok ]
 * Starting local ...
 [ ok ]

rc default logging stopped at Thu Jun 14 20:09:20 2018


Se ne parla anche quil in cui si fornisce anche un workaround in attesa di un fix definitivo
_________________
(.(*. .*).)
.. G u e r r o ..
(.(.* *.).)
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