# Les droits de / ?

**URL:** <https://www.debian-fr.org/t/les-droits-de/8633>\
**Category:** Support Debian\
**Created:** [Février 20, 2016, 4:10 UTC](https://www.debian-fr.org/t/les-droits-de/8633 "2016-02-20T16:10:54Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![SGC.Alex](https://www.debian-fr.org/user_avatar/www.debian-fr.org/sgc.alex/32/9386_2.png) [@SGC.Alex](https://www.debian-fr.org/u/SGC.Alex)\
**Post date:** [Février 20, 2016, 4:10 UTC](https://www.debian-fr.org/t/les-droits-de/8633/1 "2016-02-20T16:10:55Z")

</div>

Bonjour tout le monde.

GROS problème : je viens de découvrir à l’instant que j’ai apparemment tous les droits en tant que simple utilisateur sur la racine ! Jugez plutôt ce que me renvoie ls -l sur / :

`drwxr-xr-x 2 root root 4096 2007-07-12 12:54 bin
drwxr-xr-x 3 root root 4096 2007-07-10 18:52 boot
lrwxrwxrwx 1 root root 11 2007-03-31 12:50 cdrom -> media/cdrom
drwxr-xr-x 14 root root 4500 2007-07-16 21:03 dev
drwxr-xr-x 132 root root 12288 2007-07-16 21:01 etc
drwxr-xr-x 3 root root 4096 2007-06-05 16:25 home
drwxr-xr-x 2 root root 4096 2007-03-31 12:51 initrd
lrwxrwxrwx 1 root root 28 2007-03-31 14:54 initrd.img.old -> boot/initrd.img-2.6.18-4-486
drwxr-xr-x 15 root root 12288 2007-07-16 19:03 lib
drwx------ 2 root root 16384 2007-03-31 12:49 lost+found
drwxr-xr-x 6 root root 4096 2007-07-16 21:00 media
drwxr-xr-x 2 root root 4096 2006-10-28 16:06 mnt
drwxr-xr-x 4 root root 4096 2007-06-15 08:48 opt
dr-xr-xr-x 124 root root 0 2007-07-16 22:59 proc
drwxr-xr-x 25 root root 4096 2007-07-16 21:12 root
drwxr-xr-x 2 root root 4096 2007-07-16 19:03 sbin
drwxr-xr-x 2 root root 4096 2007-03-07 23:56 selinux
drwxr-xr-x 2 root root 4096 2007-03-31 12:51 srv
drwxr-xr-x 11 root root 0 2007-07-16 22:59 sys
drwxrwxrwt 10 root root 4096 2007-07-16 21:12 tmp
drwxr-xr-x 13 root root 4096 2007-06-22 16:22 usr
drwxr-xr-x 15 root root 4096 2007-05-13 14:46 var
lrwxrwxrwx 1 root root 25 2007-03-31 14:54 vmlinuz.old -> boot/vmlinuz-2.6.18-4-486`

- Quels sont les droits « habituels » de / ?
- Un simple chmod [ce qu’il faut] [les bons fichiers] en root suffira-t-il à régler le problème ?
- (subsidiaire) Vous avez une idée de ce qui a pu aboutir à ça ??

PS : mon fstab a l’air normal :

`proc /proc proc defaults 0 0
sysfs /sys sysfs defaults 0 0
/dev/hda2 /media/win ntfs noatime,ro,user,defaults,umask=000 0 0
/dev/hda4 / ext3 noatime,defaults,errors=remount-ro 0 1
/dev/hda6 /media/transit vfat noatime,rw,user,defaults,umask=000,utf8 0 0
/dev/hda5 none swap sw 0 0
/dev/hdb /media/cdrom0 udf,iso9660 user,noauto 0 0`

---

<div class="post-metadata">

**Author:** ![swiip81](https://www.debian-fr.org/letter_avatar_proxy/v4/letter/s/9de0a6/32.png) [@swiip81](https://www.debian-fr.org/u/swiip81)\
**Post date:** [Février 20, 2016, 4:10 UTC](https://www.debian-fr.org/t/les-droits-de/8633/2 "2016-02-20T16:10:55Z")

</div>

J’ai pas “mieux”

Sur une arborescence sans pouvoir y ajouter de fichier et lire les fichier eux même tu fais pas grand chose

---

<div class="post-metadata">

**Author:** ![dimm](https://www.debian-fr.org/letter_avatar_proxy/v4/letter/d/e9bcb4/32.png) [@dimm](https://www.debian-fr.org/u/dimm)\
**Post date:** [Février 20, 2016, 4:10 UTC](https://www.debian-fr.org/t/les-droits-de/8633/3 "2016-02-20T16:10:55Z")

</div>

Bonjour,

Ou est le problème ?  
Il n’y a que le droit d’exécution qui est autorisé pour l’utilisateur.

Si ça peut te rassurer :

`dimm@mambo:/$ ls -l /
total 88
drwxr-xr-x 2 root root 4096 2007-03-31 12:38 bin
drwxr-xr-x 3 root root 4096 2007-05-15 19:36 boot
lrwxrwxrwx 1 root root 11 2007-03-04 13:10 cdrom -> media/cdrom
drwxr-xr-x 13 root root 4220 2007-07-16 18:56 dev
drwxr-xr-x 3 root root 4096 2007-03-04 15:22 emul
drwxr-xr-x 110 root root 12288 2007-07-16 21:22 etc
drwxr-xr-x 4 root root 4096 2007-07-16 20:45 home
drwxr-xr-x 2 root root 4096 2007-03-04 13:13 initrd
lrwxrwxrwx 1 root root 27 2007-03-04 17:43 initrd.img -> boot/initrd.img-2.6.18-dimm
lrwxrwxrwx 1 root root 30 2007-03-04 13:14 initrd.img.old -> boot/initrd.img-2.6.18-4-amd64
drwxr-xr-x 15 root root 4096 2007-04-12 22:28 lib
lrwxrwxrwx 1 root root 20 2007-04-12 22:28 lib32 -> /emul/ia32-linux/lib
lrwxrwxrwx 1 root root 4 2007-03-04 13:13 lib64 -> /lib
drwx------ 2 root root 16384 2007-03-04 11:55 lost+found
drwxr-xr-x 7 root root 4096 2007-04-24 16:00 media
drwxr-xr-x 5 root root 4096 2007-04-24 11:43 mnt
drwxr-xr-x 2 root root 4096 2007-03-04 13:13 opt
dr-xr-xr-x 92 root root 0 2007-07-16 18:54 proc
drwxr-xr-x 8 root root 4096 2007-07-16 18:49 root
drwxr-xr-x 2 root root 4096 2007-07-15 18:06 sbin
drwxr-xr-x 2 root root 4096 2007-03-04 13:13 srv
drwxr-xr-x 11 root root 0 2007-07-16 18:54 sys
drwxrwxrwt 8 root root 4096 2007-07-16 20:43 tmp
drwxr-xr-x 11 root root 4096 2007-04-12 22:28 usr
drwxr-xr-x 14 root root 4096 2007-04-16 20:48 var
lrwxrwxrwx 1 root root 24 2007-03-04 17:43 vmlinuz -> boot/vmlinuz-2.6.18-dimm
lrwxrwxrwx 1 root root 27 2007-03-04 13:14 vmlinuz.old -> boot/vmlinuz-2.6.18-4-amd64`

---

<div class="post-metadata">

**Author:** ![SGC.Alex](https://www.debian-fr.org/user_avatar/www.debian-fr.org/sgc.alex/32/9386_2.png) [@SGC.Alex](https://www.debian-fr.org/u/SGC.Alex)\
**Post date:** [Février 20, 2016, 4:10 UTC](https://www.debian-fr.org/t/les-droits-de/8633/4 "2016-02-20T16:10:56Z")

</div>

[quote=“swiip81”]J’ai pas “mieux”

Sur une arborescence sans pouvoir y ajouter de fichier et lire les fichier eux même tu fais pas grand chose[/quote]

Tu es sûr ? Parce que là je peux copier, coller, supprimer n’importe quel fichier de / directement… Ça m’paraît étrange ça non ? Ou alors c’est moi qui déraille… lol

---

<div class="post-metadata">

**Author:** ![talogue](https://www.debian-fr.org/user_avatar/www.debian-fr.org/talogue/32/11542_2.png) [@talogue](https://www.debian-fr.org/u/talogue)\
**Post date:** [Février 20, 2016, 4:10 UTC](https://www.debian-fr.org/t/les-droits-de/8633/5 "2016-02-20T16:10:56Z")

</div>

Tu n’aurais pas installé un pilote de chez Samsung par hasard ?  
Regarde ce qui peut arriver :[http://linuxfr.org/forums/15/22562.html](http://linuxfr.org/forums/15/22562.html)

talogue

---

<div class="post-metadata">

**Author:** ![SGC.Alex](https://www.debian-fr.org/user_avatar/www.debian-fr.org/sgc.alex/32/9386_2.png) [@SGC.Alex](https://www.debian-fr.org/u/SGC.Alex)\
**Post date:** [Février 20, 2016, 4:10 UTC](https://www.debian-fr.org/t/les-droits-de/8633/6 "2016-02-20T16:10:56Z")

</div>

Ouais justement j’ai tout de suite pensé à ça, mais j’ai rien installé « hors des dépôts classiques » récemment, donc je ne vois pas. De plus, mon ls -l semble correct, mais je ne crois pas que pouvoir supprimer directement dans nautilus par exemple soit en accord avec les droits annoncés 😕

---

<div class="post-metadata">

**Author:** ![dimm](https://www.debian-fr.org/letter_avatar_proxy/v4/letter/d/e9bcb4/32.png) [@dimm](https://www.debian-fr.org/u/dimm)\
**Post date:** [Février 20, 2016, 4:10 UTC](https://www.debian-fr.org/t/les-droits-de/8633/7 "2016-02-20T16:10:56Z")

</div>

Tu utilises sudo ?

---

<div class="post-metadata">

**Author:** ![SGC.Alex](https://www.debian-fr.org/user_avatar/www.debian-fr.org/sgc.alex/32/9386_2.png) [@SGC.Alex](https://www.debian-fr.org/u/SGC.Alex)\
**Post date:** [Février 20, 2016, 4:10 UTC](https://www.debian-fr.org/t/les-droits-de/8633/8 "2016-02-20T16:10:56Z")

</div>

non, su.

Merci de continuer « la discut’ » avec moi, parce que j’ai l’impression que j’bile inutilement lol 😉

---

<div class="post-metadata">

**Author:** ![mattotop](https://www.debian-fr.org/user_avatar/www.debian-fr.org/mattotop/32/3942_2.png) [@mattotop](https://www.debian-fr.org/u/mattotop)\
**Post date:** [Février 20, 2016, 4:10 UTC](https://www.debian-fr.org/t/les-droits-de/8633/9 "2016-02-20T16:10:59Z")

</div>

tu bile vraiment inutilement, tes droits sont normaux.  
essaye ne serait ce que de faire un touch /toto ou un touch /bin/toto, et relis man chmod, tu comprendras peut être mieux les droits. 😆

---

<div class="post-metadata">

**Author:** ![SGC.Alex](https://www.debian-fr.org/user_avatar/www.debian-fr.org/sgc.alex/32/9386_2.png) [@SGC.Alex](https://www.debian-fr.org/u/SGC.Alex)\
**Post date:** [Février 20, 2016, 4:11 UTC](https://www.debian-fr.org/t/les-droits-de/8633/10 "2016-02-20T16:11:02Z")

</div>

Soit.

C’est juste que je n’me souviens pas avoir vu des « petits cadenas » sur les icônes des dossiers la dernière fois que j’suis passé faire un tour dans /, alors j’pensais que les droits avaient été modifiés…

---

<div class="post-metadata">

**Author:** ![Ludo](https://www.debian-fr.org/user_avatar/www.debian-fr.org/ludo/32/3426_2.png) [@Ludo](https://www.debian-fr.org/u/Ludo)\
**Post date:** [Février 20, 2016, 4:11 UTC](https://www.debian-fr.org/t/les-droits-de/8633/11 "2016-02-20T16:11:02Z")

</div>

C’est tout ce qu’il y a de plus normal que en tant qu’utilisateur tu puisse lire et exécuter des programes, ce qui veut dire que tu peut les copier dans ton répertoire hoem et en faire ce que tu veux.

Pour rapperl les droits se divise en trois partie:

```auto
root:root RWX | R-X | R-X
user:group proprio | group | other
```

Donc en tant que simple utilisateurs se sera les droits de ‘other’ qui te seront attribué vu que tu n’est pas root, et tu ne fait pas partie de son groupe. ( R=read (4) ; W= write (2); X= execute(1) )

---

<div class="post-metadata">

**Author:** ![SGC.Alex](https://www.debian-fr.org/user_avatar/www.debian-fr.org/sgc.alex/32/9386_2.png) [@SGC.Alex](https://www.debian-fr.org/u/SGC.Alex)\
**Post date:** [Février 20, 2016, 4:11 UTC](https://www.debian-fr.org/t/les-droits-de/8633/12 "2016-02-20T16:11:03Z")

</div>

> [@Ludo](#):
>
> Donc en tant que simple utilisateurs se sera les droits de ‹&nbsp;other&nbsp;› qui te seront attribué vu que tu n’est pas root, et tu ne fait pas partie de son groupe. ( R=read (4) ; W= write (2); X= execute(1) )

Ouais, justement : je ne dois pas pouvoir écrire, mais je peux créer un fichier texte vierge dans / par exemple.. 😮

[quote=«&nbsp;mattotop&nbsp;»]touch /toto[/quote] Bah je peux le faire, ça crée un fichier vide sans problème

[quote=«&nbsp;mattotop&nbsp;»]touch /bin/toto[/quote]mais là j’peux pas…

---

<div class="post-metadata">

**Author:** ![mattotop](https://www.debian-fr.org/user_avatar/www.debian-fr.org/mattotop/32/3942_2.png) [@mattotop](https://www.debian-fr.org/u/mattotop)\
**Post date:** [Février 20, 2016, 4:11 UTC](https://www.debian-fr.org/t/les-droits-de/8633/13 "2016-02-20T16:11:03Z")

</div>

alors ça, le touch /toto qui passe (en user, tu es sûr ?) c’est totalement anormal:

[quote]console@MAT64LIN:/usr/bin$ touch /toto  
touch: cannot touch `/toto’: Permission denied  
console@MAT64LIN:/usr/bin$ ls -la /  
total 80  
drwxr-xr-x 21 root root 4096 Jun 5 12:05 .  
drwxr-xr-x 21 root root 4096 Jun 5 12:05 …  
drwxr-xr-x 2 root root 4096 May 31 10:19 bin  
drwxr-xr-x 3 root root 4096 Jul 12 10:51 boot  
drwxr-xr-x 18 root root 14080 Jul 16 09:50 dev  
drwxr-xr-x 3 root root 4096 Jun 28 2006 emul  
drwxr-xr-x 121 root root 8192 Jul 16 10:16 etc  
drwxrwsr-x 4 root staff 4096 Jun 23 2006 home  
lrwxrwxrwx 1 root root 35 May 22 10:29 initrd.img -\> boot/initrd.img-2.6.21-custom-em64t  
drwxr-xr-x 16 root root 8192 Jul 2 13:04 lib  
lrwxrwxrwx 1 root root 20 Jun 5 12:05 lib32 -\> /emul/ia32-linux/lib  
lrwxrwxrwx 1 root root 4 Jun 5 12:05 lib64 -\> /lib  
drwx------ 2 root root 4096 Jun 28 2006 lost+found  
drwxr-xr-x 3 root root 4096 Jul 16 09:50 media  
drwxr-xr-x 6 root root 4096 May 15 11:16 mnt  
drwxr-xr-x 3 root root 4096 Jul 3 09:57 opt  
dr-xr-xr-x 135 root root 0 Jul 16 09:50 proc  
drwxr-xr-x 15 root root 4096 May 7 11:02 root  
drwxr-xr-x 2 root root 4096 Jun 7 10:21 sbin  
drwxr-xr-x 2 root root 4096 Jun 23 2006 srv  
drwxr-xr-x 11 root root 0 Jul 16 09:50 sys  
drwxrwxrwt 12 root root 4096 Jul 17 10:33 tmp  
drwxr-xr-x 13 root root 4096 Jun 5 12:05 usr  
drwxr-xr-x 16 root root 4096 Apr 11 10:04 var  
lrwxrwxrwx 1 root root 32 May 22 10:29 vmlinuz -\> boot/vmlinuz-2.6.21-custom-em64t  
[/quote]

---

<div class="post-metadata">

**Author:** ![SGC.Alex](https://www.debian-fr.org/user_avatar/www.debian-fr.org/sgc.alex/32/9386_2.png) [@SGC.Alex](https://www.debian-fr.org/u/SGC.Alex)\
**Post date:** [Février 20, 2016, 4:11 UTC](https://www.debian-fr.org/t/les-droits-de/8633/14 "2016-02-20T16:11:03Z")

</div>

Bah oui, malheureusement j’suis sûr (d’où ma question !) :

`debbie@debian:~$ touch /toto
debbie@debian:~$ ls -la /
total 104
drwxrwxrwx 22 root root 4096 2007-07-17 10:40 .
drwxrwxrwx 22 root root 4096 2007-07-17 10:40 ..
drwxr-xr-x 2 root root 4096 2007-07-12 12:54 bin
drwxr-xr-x 3 root root 4096 2007-07-10 18:52 boot
lrwxrwxrwx 1 root root 11 2007-03-31 12:50 cdrom -> media/cdrom
drwxr-xr-x 14 root root 4500 2007-07-17 09:36 dev
drwxr-xr-x 132 root root 12288 2007-07-17 10:33 etc
drwxr-xr-x 3 root root 4096 2007-06-05 16:25 home
drwxr-xr-x 2 root root 4096 2007-03-31 12:51 initrd
lrwxrwxrwx 1 root root 28 2007-03-31 14:54 initrd.img.old -> boot/initrd.img-2.6.18-4-486
drwxr-xr-x 15 root root 12288 2007-07-16 19:03 lib
drwx------ 2 root root 16384 2007-03-31 12:49 lost+found
drwxr-xr-x 6 root root 4096 2007-07-17 09:34 media
drwxr-xr-x 2 root root 4096 2006-10-28 16:06 mnt
drwxr-xr-x 4 root root 4096 2007-06-15 08:48 opt
dr-xr-xr-x 126 root root 0 2007-07-17 11:33 proc
drwxr-xr-x 25 root root 4096 2007-07-16 21:12 root
drwxr-xr-x 2 root root 4096 2007-07-16 19:03 sbin
drwxr-xr-x 2 root root 4096 2007-03-07 23:56 selinux
drwxr-xr-x 2 root root 4096 2007-03-31 12:51 srv
drwxr-xr-x 11 root root 0 2007-07-17 11:33 sys
drwxrwxrwt 12 root root 4096 2007-07-17 10:37 tmp
-rw-r--r-- 1 debbie debbie 0 2007-07-17 10:40 toto
drwxr-xr-x 13 root root 4096 2007-06-22 16:22 usr
drwxr-xr-x 15 root root 4096 2007-05-13 14:46 var
lrwxrwxrwx 1 root root 25 2007-03-31 14:54 vmlinuz.old -> boot/vmlinuz-2.6.18-4-486`

D’ailleurs les deux premières lignes confirment mes craintes…

En revanche, ça c’est bon :

`debbie@debian:~$ touch /bin/toto
touch: ne peut faire un touch sur `/bin/toto': Permission denied`

---

<div class="post-metadata">

**Author:** ![mattotop](https://www.debian-fr.org/user_avatar/www.debian-fr.org/mattotop/32/3942_2.png) [@mattotop](https://www.debian-fr.org/u/mattotop)\
**Post date:** [Février 20, 2016, 4:11 UTC](https://www.debian-fr.org/t/les-droits-de/8633/15 "2016-02-20T16:11:04Z")

</div>

bon, ben pourquoi c’est comme ça, mistère…  
pour corriger:

`chmod 0755 /` surtout pas en -R

---

<div class="post-metadata">

**Author:** ![SGC.Alex](https://www.debian-fr.org/user_avatar/www.debian-fr.org/sgc.alex/32/9386_2.png) [@SGC.Alex](https://www.debian-fr.org/u/SGC.Alex)\
**Post date:** [Février 20, 2016, 4:11 UTC](https://www.debian-fr.org/t/les-droits-de/8633/16 "2016-02-20T16:11:04Z")

</div>

`debbie@debian:~$ su
Password: 
debian:/home/debbie# chmod 0755 /
debian:/home/debbie# exit
exit
debbie@debian:~$ ls -la /
total 104
drwxr-xr-x 22 root root 4096 2007-07-17 10:44 .
drwxr-xr-x 22 root root 4096 2007-07-17 10:44 ..
drwxr-xr-x 2 root root 4096 2007-07-12 12:54 bin
drwxr-xr-x 3 root root 4096 2007-07-10 18:52 boot
lrwxrwxrwx 1 root root 11 2007-03-31 12:50 cdrom -> media/cdrom
drwxr-xr-x 14 root root 4500 2007-07-17 09:36 dev
drwxr-xr-x 132 root root 12288 2007-07-17 10:33 etc
drwxr-xr-x 3 root root 4096 2007-06-05 16:25 home
drwxr-xr-x 2 root root 4096 2007-03-31 12:51 initrd
lrwxrwxrwx 1 root root 28 2007-03-31 14:54 initrd.img.old -> boot/initrd.img-2.6.18-4-486
drwxr-xr-x 15 root root 12288 2007-07-16 19:03 lib
drwx------ 2 root root 16384 2007-03-31 12:49 lost+found
drwxr-xr-x 6 root root 4096 2007-07-17 09:34 media
drwxr-xr-x 2 root root 4096 2006-10-28 16:06 mnt
drwxr-xr-x 4 root root 4096 2007-06-15 08:48 opt
dr-xr-xr-x 125 root root 0 2007-07-17 11:33 proc
drwxr-xr-x 25 root root 4096 2007-07-16 21:12 root
drwxr-xr-x 2 root root 4096 2007-07-16 19:03 sbin
drwxr-xr-x 2 root root 4096 2007-03-07 23:56 selinux
drwxr-xr-x 2 root root 4096 2007-03-31 12:51 srv
drwxr-xr-x 11 root root 0 2007-07-17 11:33 sys
drwxrwxrwt 12 root root 4096 2007-07-17 10:47 tmp
drwxr-xr-x 13 root root 4096 2007-06-22 16:22 usr
drwxr-xr-x 15 root root 4096 2007-05-13 14:46 var
lrwxrwxrwx 1 root root 25 2007-03-31 14:54 vmlinuz.old -> boot/vmlinuz-2.6.18-4-486`

OK c’est tout bon.

Merci à tous, même si ça semblait normal au premier abord 😆
