Page 1 of 1

Mogrify unable to overwrite files when using -path?

Posted: 2012-02-03T03:45:49-07:00
by mabian
Hello, I am using (on Windows) the following command:

mogrify -format "jpg" -density 72x72 -quality 91 -resize 130x130 -background white -flatten -colorspace RGB -path "E:\image_tests\New\60" "\\192.168.1.200\ELC_Dati\FotoEPS\60\*.eps"

The source folder contains only a file, 60.eps; the target file 60.jpg is produced only if it doesn't already exist. In other words, if the target file already exists the mogrify command, after working for a while, ends with no errors but without overwriting the file.

Can you help figuring out what's wrong?

Thanks,
Mario

Re: Mogrify unable to overwrite files when using -path?

Posted: 2012-02-03T17:54:17-07:00
by anthony
IM does not have anything to stop overwrites, that is not it job.

Is the existing destination file you want to overwrite writable? That is file ownership, permissions, the filesystem (USB lock, mount permissions)?

Web server run processes often do not have write access by default as they are run as a low privalage special daemon-type user, as a added security measure.

Also in Redhat/Fedora systems the kernel takes it further using SELinux attributes preventing changes and access to files not designated right. as a further security mechanism.

Re: Mogrify unable to overwrite files when using -path?

Posted: 2012-02-06T04:07:17-07:00
by mabian
Hello, thanks for answering; I have tested on different paths and indeed mogrify is able to overwrite files.

There must be something odd going on with the original paths I'm using (Windows local and UNC paths) and related permissions...

Thanks,
Mario