[gull] mount -o loop et permissions
Pierre Maitre
maitre at cdg.ch
Sat Sep 20 19:36:02 CEST 2003
Bonjour à tous
Je dois modifier le contenu d'un CDROM. J'ai donc copié l'image du CDROM
sur le disque dur avec dd, puis monté l'image avec l'option loop (en
read-write). Curieusement, malgré des permissions rw, je n'arrive pas à
créer/renommer des fichiers sur l'image montée avec loop.
Démonstration:
anesth1:/mnt# mount -t iso9660 -o rw,loop=/dev/loop1 /tmp/fichier.iso
/mnt/test
anesth1:/mnt# ls -l /mnt/test
total 12
-r-xr-xr-x 1 root root 54 aoû 25 12:37 autorun.bat
-r-xr-xr-x 1 root root 45 aoû 25 12:37 autorun.inf
-r-xr-xr-x 1 root root 3262 aoû 25 12:37 cdrom.ico
dr-xr-xr-x 1 root root 2048 aoû 26 13:21 doc
-r-xr-xr-x 1 root root 3457 aoû 25 12:37 index.html
dr-xr-xr-x 1 root root 2048 aoû 28 05:44 KNOPPIX
anesth1:/mnt# cd /mnt/test
anesth1:/mnt/test# chmod 777 KNOPPIX
chmod: changing permissions of `KNOPPIX': Read-only file system
Déjà là, je ne comprends pas. J'ai pourtant monté le système en rw.
La suite:
anesth1:/mnt/test# mount -o remount,rw /mnt/test
anesth1:/mnt/test# chmod 777 KNOPPIX
anesth1:/mnt/test# ls -ld KNOPPIX
drwxrwxrwx 1 root root 2048 aoû 28 05:44 KNOPPIX
anesth1:/mnt/test# ls -l KNOPPIX
total 707383
-r-xr-xr-x 1 root root 159911 aoû 24 03:08 background.jpg
-r-xr-xr-x 1 root root 2048 sep 2 22:14 boot.cat
-r-xr-xr-x 1 root root 1474560 aoû 24 03:08 boot.img
-r-xr-xr-x 1 root root 9983 aoû 24 03:08 index_en.html
... blabla
anesth1:/mnt/test# cd KNOPPIX
anesth1:/mnt/test/KNOPPIX# chmod 755 boot*
anesth1:/mnt/test/KNOPPIX# ls -l boot*
-rwxr-xr-x 1 root root 2048 sep 2 22:14 boot.cat
-rwxr-xr-x 1 root root 1474560 aoû 24 03:08 boot.img
anesth1:/mnt/test/KNOPPIX# mv boot.img boot.img.bak
mv: cannot create regular file `boot.img.bak': Permission denied
Quelqu'un pourrait-il m'expliquer pourquoi j'ai ce message d'erreur
alors que le fichier boot.img a comme permission -rwxr-xr-x, et que le
répertoire KNOPPIX qui contient le fichier a comme permissions 777?
Est-ce un bug de loop?
Encore une précision: debian woody, noyau 2.4.18-bf2.4
Toute aide est bienvenue, merci d'avance!
Pierre Maitre
--
Dr Pierre-O. Maitre
Privat Docent
FMH Anesthésiologie
FMH Pharmacologie Clinique
Cabinet médical / A la Joy
CH-1272 Genolier Switzerland
More information about the gull
mailing list