Mogrify unable to overwrite files when using -path?

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
mabian
Posts: 6
Joined: 2012-02-03T03:14:50-07:00
Authentication code: 8675308

Mogrify unable to overwrite files when using -path?

Post 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
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

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

Post 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.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
mabian
Posts: 6
Joined: 2012-02-03T03:14:50-07:00
Authentication code: 8675308

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

Post 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
Post Reply