Oops, this was meant to be off-list. (I'm used to "reply" not going to the list.) Sorry for speaking French here.
Manuel Pégourié-Gonnard a écrit : > Elie Roux a écrit : >> Manuel Pégourié-Gonnard a écrit : >>> On the contrary, as Taco said, and as every Unix guru will confirm, it >>> is *the* >>> way to go. Just try opening and see if it worked. The system is not >>> going to >>> blame you because you tried to do something forbidden :-) >>> >> Ok then... it sound weird to open and close a file to see if it's >> writable, but why not... > > Comme l'a dit Taco, les permissions ne te diront jamais si un système de > fichiers en est lecture seule par exemple, et il y tout un tas d'autres choses > qu'elles ne te diront jamais. Exemple : > > thue:/home/sftponly/shared# ls -l foo > -rw-r--r-- 1 root root 0 2010-03-01 19:48 foo > thue:/home/sftponly/shared# id > uid=0(root) gid=0(root) groups=0(root) > thue:/home/sftponly/shared# echo hi > foo > zsh: read-only file system: foo > thue:/home/sftponly/shared# > > Et pourtant, c'est roo qui essaie, donc il a grave les droits... > > Par ailleurs un autre problème est celui du temps : ce n'est pas parce qu'on > peut écrire à un endroit à un moment qu'on pourra aussi à un autre moment. Du > coup, ça n'a pas grand sens de vérifier si on peut écrire dans un fichier à un > autre moment que l'instant précis om on veut y écrire. > >> Anyway, in a purpose of path normalization I >> would really like to the the true files behind symlinks... >> > Réponse sur la liste. > > m
