lors de la commande (depuis ma connexion à distance sur pc car le Raspberry est dans mon grenier...)
pi@raspberrypi:/mnt $ sudo chmod -R g+w share
pi@raspberrypi:/mnt $ ls -al
total 12
drwxr-xr-x 3 root root 4096 mai 2 20:01 .
drwxr-xr-x 18 root root 4096 mai 7 2021 ..
drwxr-xr-x 2 root root 4096 mai 2 21:46 share
La commande semble passé mais rien ne bouge... j'ai essayé d'autres combinaisons sans succès
du genre :
pi@raspberrypi:/mnt $ sudo chmod -R o+rw share
pi@raspberrypi:/mnt $ ls -al
total 12
drwxr-xr-x 3 root root 4096 mai 2 20:01 .
drwxr-xr-x 18 root root 4096 mai 7 2021 ..
drwxr-xr-x 2 root root 4096 mai 2 21:46 share
Je ne parles pas de problème d'échange de fichier entre Windows 11 et le Raspberry (cela fonctionne).
Pour la connexion à distance j'utilise tout simplement Connexion Bureau à distance de windows 11 avec l'adresse Ip du raspberry, cela fonctionne nickel sans rien avoir à paramétrer je peux modifier les fichiers de mon début de serveur depuis mon PC puis les tester avec mon PC le tout depuis mon bureau...
Je parle du fait que depuis la connexion à distance (et aussi depuis directement le Raspberry(je viens d'essayer) ) sur mon Raspberry je ne puisse pas changer les droit d'accès au fameux dossier share (voir commandes passées ci-dessus)
J'ai réussi à changer les droits du dossier /mnt
drwxr-xr-x 3 root root 4096 mai 2 20:01 mnt " droits originaux
pi@raspberrypi:/ $ sudo chmod -R o+rw mnt "lancement de la commande de modification des droits
pi@raspberrypi:/ $ ls -al "contrôle
drwxrwxr-x 3 root root 4096 mai 2 20:01 mnt "c'est donc bon
Essais de nouveau sur le dossier share (contenu dans mnt)
pi@raspberrypi:/ $ cd /mnt
pi@raspberrypi:/mnt $ ls -al
total 12
drwxrwxrwx 3 root root 4096 mai 2 20:01 .
drwxr-xr-x 18 root root 4096 mai 7 2021 ..
drwxr-xr-x 2 root root 4096 mai 2 21:46 share "droits originaux
pi@raspberrypi:/mnt $ sudo chmod -R g+w share " commande de demande de changement des droits
pi@raspberrypi:/mnt $ ls -al "contrôle
total 12
drwxrwxrwx 3 root root 4096 mai 2 20:01 .
drwxr-xr-x 18 root root 4096 mai 7 2021 ..
drwxr-xr-x 2 root root 4096 mai 2 21:46 share "echec
pi@raspberrypi:/mnt $ sudo chmod g+w share "autre essai sans le -R
pi@raspberrypi:/mnt $ ls -al "contrôle
total 12
drwxrwxrwx 3 root root 4096 mai 2 20:01 .
drwxr-xr-x 18 root root 4096 mai 7 2021 ..
drwxr-xr-x 2 root root 4096 mai 2 21:46 share "echec
pi@raspberrypi:/mnt $
Voila j'espère mettre bien expliqué!
PS: choses assez "marrante" je viens d'essayer de détruire depuis mon PC un fichier contenu dans le dossier share (que j'avais réussi à créer avec la commande : sudo touch test.txt) cela fonctionne depuis le PC! De même je peux copier des fichiers du Raspberry depuis la connexion à distance (donc depuis mon PC) et le coller soit dans le dossier partagé avec le Raspberry (au niveau du PC) ou même sur mon bureau de PC.
Mais depuis le Raspberry je ne peux pas les copier sur le dossier share mais je peux les copier dans le dossier/mnt
Merci
- Edité par GillesMangin-Voirin 6 mai 2022 à 8:53:54
PS: choses assez "marrante" je viens d'essayer de détruire depuis mon PC un fichier contenu dans le dossier share (que j'avais réussi à créer avec la commande : sudo touch test.txt) cela fonctionne depuis le PC! De même je peux copier des fichiers du Raspberry depuis la connexion à distance (donc depuis mon PC) et le coller soit dans le dossier partagé avec le Raspberry (au niveau du PC) ou même sur mon bureau de PC.
Mais depuis le Raspberry je ne peux pas les copier sur le dossier share mais je peux les copier dans le dossier/mnt
Merci
Bonjour,
Si vous êtes connecté avec root, c'est normal. Vous êtes connecté avec quel utilisateur ?
Concernant les droits, quel est le système de fichier de la partition ?
Oui forcément les dossiers sont créés par root, pour root, et seulement root...Pour modifier, de nos jours je ne conseillerais pas de mettre un autre user comme propriétaire (chmod) mais juste ajouter des ACL pour chaque groupe/utilisateur qui peut modifier les fichiers/dossiers.
C'est ce qu'il manquait à l'époque sur ext2, en plus de la journalisation, les ACL, qui sont très pratiques et fonctionnaient sous NT4 sans problème pour les partages Windows.
PS: les clients pour réseaux microsoft sont assez courant en entreprise.(et tout ça c'est de la config de samba, il était presque préconfiguré, ce qui est déjà bien, mais après il faut ajuster les permissions au cas par cas.)
Bonjour, alors depuis j'ai fais pas mal d'essai et du coup plus rien ne fonctionne! je n'arrive plus à partager de dossier (je ne sais pas ou j'ai merd...)
pour ce qui est de la commande :lsblk -f
voici ce qu'elle donne à l'heure actuelle ou je n'ai plus aucun partage!
pi@raspberrypi:~ $ lsblk -f
NAME FSTYPE LABEL UUID FSAVAIL FSUSE% MOUNTPOINT
sda
└─sda1
vfat SAUVEGARDES
BC53-1C04 14,9G 0% /media/pi/
mmcblk0
│
├─mmcblk0p1
│ vfat boot 7616-4FD8 203,9M 19% /boot
└─mmcblk0p2
ext4 rootfs
87b585d1-84c3-486a-8f3d-77cf16f84f30 22,6G 18% /
Pour ce qui est des ACL comme je débute c'est un grand mystère pour moi actuellement j'ai en cours l'essai de partage de 2 dossiers sur le bureau de mon PC (PCBUREAUGILLES, IP fixe 192.168.1.11) un dossier Sauvegarde_Raspberry et Sauvegarde_Raspberry2 tout deux en partage avec tout le monde et controle total.
Et sur le Raspberry dans le dossier /mnt/ un dossier share et un dossier partage.
Dans le fichier /etc/fstab j'ai ceci:
proc /proc proc defaults 0 0
PARTUUID=56933308-01 /boot vfat defaults 0 2
PARTUUID=56933308-02 / ext4 defaults,noatime 0 1
# a swapfile is not a swap partition, no line here
# use dphys-swapfile swap[on|off] for that
#adresse du dossier pc partagé
//192.168.1.11/Users/rxyz@orange.fr/Desktop/Sauvegarde_Raspberry /mnt/share cifs username=rxyz@orange.fr,password=monmotdepasse,iochartset=utf8 0 0
//PCBUREAUGILLES/Sauvegarde_Raspberry2 /mnt/partage cifs username=rxyz@orange.fr,password=monmotdepasse,iocharset=utf8 0 0
puis le mot de passe lorsqu'il est demandé mais j'obtiens ceci :
pi@raspberrypi:~ $ smbclient "\\\\192.168.1.11\\Sauvegarde_Raspberry2" -U rxyz@orange.fr -d 4
lp_load_ex: refreshing parameters
Initialising global parameters
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
Processing section "[global]"
doing parameter workgroup = WORKGROUP
doing parameter log file = /var/log/samba/log.%m
doing parameter max log size = 1000
doing parameter logging = file
doing parameter panic action = /usr/share/samba/panic-action %d
doing parameter server role = standalone server
doing parameter obey pam restrictions = yes
doing parameter unix password sync = yes
doing parameter passwd program = /usr/bin/passwd %u
doing parameter passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
doing parameter pam password change = yes
doing parameter map to guest = bad user
doing parameter usershare allow guests = yes
pm_process() returned Yes
mkdir failed on directory /var/run/samba/msg.lock: Permission non accordée
cmdline_messaging_context: Unable to initialize messaging context.
Unable to initialize messaging context
lp_load_ex: refreshing parameters
Initialising global parameters
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
Processing section "[global]"
doing parameter workgroup = WORKGROUP
doing parameter log file = /var/log/samba/log.%m
doing parameter max log size = 1000
doing parameter logging = file
doing parameter panic action = /usr/share/samba/panic-action %d
doing parameter server role = standalone server
doing parameter obey pam restrictions = yes
doing parameter unix password sync = yes
doing parameter passwd program = /usr/bin/passwd %u
doing parameter passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
doing parameter pam password change = yes
doing parameter map to guest = bad user
doing parameter usershare allow guests = yes
pm_process() returned Yes
added interface wlan0 ip=2a01:cb11:3fa:a400:63a1:9df9:58b6:4232 bcast= netmask=ffff:ffff:ffff:ffff::
added interface eth0 ip=2a01:cb11:3fa:a400:f43d:6b0d:d58c:f7d0 bcast= netmask=ffff:ffff:ffff:ffff::
added interface wlan0 ip=192.168.1.47 bcast=192.168.1.255 netmask=255.255.255.0
added interface eth0 ip=192.168.1.57 bcast=192.168.1.255 netmask=255.255.255.0
Client started (version 4.9.5-Debian).
Connecting to 192.168.1.11 at port 445
session request ok
negotiated dialect[SMB3_11] against server[192.168.1.11]
got OID=1.3.6.1.4.1.311.2.2.30
got OID=1.3.6.1.4.1.311.2.2.10
Enter rxyz@orange.fr's password:
GENSEC backend 'gssapi_spnego' registered
GENSEC backend 'gssapi_krb5' registered
GENSEC backend 'gssapi_krb5_sasl' registered
GENSEC backend 'spnego' registered
GENSEC backend 'schannel' registered
GENSEC backend 'naclrpc_as_system' registered
GENSEC backend 'sasl-EXTERNAL' registered
GENSEC backend 'ntlmssp' registered
GENSEC backend 'ntlmssp_resume_ccache' registered
GENSEC backend 'http_basic' registered
GENSEC backend 'http_ntlm' registered
GENSEC backend 'http_negotiate' registered
GENSEC backend 'krb5' registered
GENSEC backend 'fake_gssapi_krb5' registered
Got challenge flags:
Got NTLMSSP neg_flags=0x628a8215
NTLMSSP_NEGOTIATE_UNICODE
NTLMSSP_REQUEST_TARGET
NTLMSSP_NEGOTIATE_SIGN
NTLMSSP_NEGOTIATE_NTLM
NTLMSSP_NEGOTIATE_ALWAYS_SIGN
NTLMSSP_TARGET_TYPE_SERVER
NTLMSSP_NEGOTIATE_EXTENDED_SESSIONSECURITY
NTLMSSP_NEGOTIATE_TARGET_INFO
NTLMSSP_NEGOTIATE_VERSION
NTLMSSP_NEGOTIATE_128
NTLMSSP_NEGOTIATE_KEY_EXCH
NTLMSSP: Set final flags:
Got NTLMSSP neg_flags=0x62088215
NTLMSSP_NEGOTIATE_UNICODE
NTLMSSP_REQUEST_TARGET
NTLMSSP_NEGOTIATE_SIGN
NTLMSSP_NEGOTIATE_NTLM
NTLMSSP_NEGOTIATE_ALWAYS_SIGN
NTLMSSP_NEGOTIATE_EXTENDED_SESSIONSECURITY
NTLMSSP_NEGOTIATE_VERSION
NTLMSSP_NEGOTIATE_128
NTLMSSP_NEGOTIATE_KEY_EXCH
NTLMSSP Sign/Seal - Initialising with flags:
Got NTLMSSP neg_flags=0x62088215
NTLMSSP_NEGOTIATE_UNICODE
NTLMSSP_REQUEST_TARGET
NTLMSSP_NEGOTIATE_SIGN
NTLMSSP_NEGOTIATE_NTLM
NTLMSSP_NEGOTIATE_ALWAYS_SIGN
NTLMSSP_NEGOTIATE_EXTENDED_SESSIONSECURITY
NTLMSSP_NEGOTIATE_VERSION
NTLMSSP_NEGOTIATE_128
NTLMSSP_NEGOTIATE_KEY_EXCH
SPNEGO login failed: The attempted logon is invalid. This is either due to a bad username or authentication information.
session setup failed: NT_STATUS_LOGON_FAILURE
La commande mount :
pi@raspberrypi:~ $ sudo mount.cifs //192.168.1.11/Sauvegarde_Raspberry2 /mnt/partage cifs -o username=rxyz@orange.fr
Password for rxyz@orange.fr@//192.168.1.11/Sauvegarde_Raspberry2: ***********
mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
pi@raspberrypi:~ $ sudo mount.cifs //PCBUREAUGILLES/Sauvegarde_Raspberry2 /mnt/partage cifs -o username=rxyz@orange.fr
Password for rxyz@orange.fr@//PCBUREAUGILLES/Sauvegarde_Raspberry2: ***********
mount error(115): Operation now in progress
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
pi@raspberrypi:~ $ sudo mount.cifs //PCBUREAUGILLES/Sauvegarde_Raspberry /mnt/share cifs -o username=rxyz@orange.fr
Password for xyz@orange.fr@//PCBUREAUGILLES/Sauvegarde_Raspberry: ***********
mount error(115): Operation now in progress
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
pi@raspberrypi:~ $ sudo mount.cifs //192.168.1.11/Sauvegarde_Raspberry /mnt/share cifs -o username=rxyz@orange.fr
Password for rxyz@orange.fr@//192.168.1.11/Sauvegarde_Raspberry: ***********
mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
Bref je patauge un peu (c'est rien de le dire) et le pire c'est que cela fonctionnait presque avant que j'essaye de résoudre le problème initial.
drwxr-xr-x 3 root root 4096 mai 2 20:01 mnt " droits originaux
pi@raspberrypi:/ $ sudo chmod -R o+rw mnt "lancement de la commande de modification des droits
pi@raspberrypi:/ $ ls -al "contrôle
drwxrwxr-x 3 root root 4096 mai 2 20:01 mnt "c'est donc bon
Avec o+rw, ça ne devrait pas changer les droits du groupe, mais ceux des autres (other) !! C'est quoi ce binz !! (pas normal)
D'autre part:
pi@raspberrypi:/mnt $ sudo chmod -R o+rw share
pi@raspberrypi:/mnt $ ls -al
total 12
drwxr-xr-x 3 root root 4096 mai 2 20:01 .
drwxr-xr-x 18 root root 4096 mai 7 2021 ..
drwxr-xr-x 2 root root 4096 mai 2 21:46 share
À comparer avec l'exemple précédent. Qu'est-ce à dire? Peut-être parce que /mnt/share est le point de montage //192.168.1.11/Users/rxyz@orange.fr/Desktop/Sauvegarde_Raspberry
D'autant plus qu'il s'agit de 'windows' de l'autre côté je dirais.
c.f. ton fstab:
#adresse du dossier pc partagé
//192.168.1.11/Users/rxyz@orange.fr/Desktop/Sauvegarde_Raspberry /mnt/share cifs username=rxyz@orange.fr,password=monmotdepasse,iochartset=utf8 0 0
Une fois les dossiers crées et partagés pour permettre l'écriture en utilisateur pi dans le fichier /etc/fstab j'ai mis: //IP FIXE DE MON PC/nom du dossier partagé sur le PC /mnt/share cifs _netdev,uid=1000,gid=1000,rw,username=nom de ma session PC,password=votremotdepasse 0 0
/mnt/share étant ici le nom du dossier Raspberry partagé et il vous faut un PC avec une session à mt de passe lors de la connexion au PC... Merci encore
chmod -R semble passer, mais rien ne bouge
× Après avoir cliqué sur "Répondre" vous serez invité à vous connecter pour que votre message soit publié.
× Attention, ce sujet est très ancien. Le déterrer n'est pas forcément approprié. Nous te conseillons de créer un nouveau sujet pour poser ta question.
Validez la réponse utile « Un problème clairement exposé est à moitié résolu. » Pas de MP technique