Hello,

Le Tuesday 27 September 2005 à 00:04:04, Reuben Thomas a écrit:
> jhead -ce changes the read/write permissions when it rewrites the
> comment, apparently to my current umask. This is annoying when I use
> it e.g. to edit the comment of a file in my public_html directory
> which needs to be world-readable to be read by the web server.

I tried to reproduce this bug. It is quiet easy in fact.

$ ls -l test.jpg
-rw-r--r--  1 rousseau rousseau 209812 2005-10-08 22:37 test.jpg
$ umask
0022
$ jhead -ce test.jpg 
Modified: test.jpg
$ ls -l test.jpg
-rw-r--r--  1 rousseau rousseau 209814 2005-10-08 22:40 test.jpg

$ umask 077
$ ls -l test.jpg 
-rw-r--r--  1 rousseau rousseau 209814 2005-10-08 22:40 test.jpg
$ jhead -ce test.jpg 
Modified: test.jpg
$ ls -l test.jpg 
-rw-------  1 rousseau rousseau 209812 2005-10-08 22:41 test.jpg

A new file is created using fopen(). So the umask is important.


jhead is working under Windows and Unix. I don't know how to manage
permissions in a portable way. Maybe the code would be Unix specific.
I will try to work on a patch.

Bye,

-- 
 Dr. Ludovic Rousseau                        [EMAIL PROTECTED]
 -- Normaliser Unix c'est comme pasteuriser le camembert, L.R. --


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to