• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Question Convert command from ImageMagick does not work, and saying convert: unable to open image :

questhk09

New Pleskian
Hi,

I’m trying to use convert command from ImageMagick like below by placing in.JPG right under httpdocs, and had an message like below. I’ve also tried to place the files several other directories in order just to test to find out what will happen and the results were same.

[root@server-XXXXXXX-X ~]# convert in.JPG –strip out.JPG

convert: unable to open image `in.JPG': No such file or directory @ error/blob.c/OpenBlob/2589.

convert: missing an image filename `out.JPG ' @ error/convert.c/ConvertImageCommand/3015.

I do not think that the problems come from the directory issues, and have no idea what is casing this. I would appreciate if you could give me some tips.


OS:centos-6 (x86_64)
Plesk 17.0.17
ImageMagick-6.7.2.7-6.el6.x86_64
ImageMagick-devel
php-devel
PECL imagick
 
Hello,

Could you check the name of file ("in.jpg" and "in.JPG" two differ files), file permissions with command `ls -la`? Also, be sure you run `convert` in a directory with files because you do not use an absolute path to files. Could you run the command with absolute path?

Is enabled selinux on your server (check output of command `sestatus`)?
 
AYamshanov,

Thank for great information. I have 2 questions now.

1.Regarding directory issue, what convert command line should I write if there is in.jpg under the below directory?

/httpdocs/upload/temp_image/in.jpg (out.jpg)

[root@server-XXXXXXX-X ~]# convert.........

2.Regarding permission issue, what command line should I write to check if it's ok or not? If it's not, then how should I grant permission?
 
Could you post there an output of next commands...
1) ls -la /
2) ls -la /httpdocs/upload/temp_image/
3) whereis convert
...?
 
AYamshanov,

Thank you for your time.

I tried and I wonder if it's what you want me to do.

[root@server-XXXXXXX-X ~]# ls -la /
total 132
dr-xr-xr-x 24 root root 4096 Nov 13 06:37 .
dr-xr-xr-x 24 root root 4096 Nov 13 06:37 ..
-rw-r--r-- 1 root root 0 Nov 13 06:37 .autofsck
-rw-r--r-- 1 root root 0 Oct 27 14:16 .autorelabel
dr-xr-xr-x 2 root root 4096 Nov 9 20:19 bin
dr-xr-xr-x 3 root root 4096 Mar 28 2016 boot
drwx------ 2 root root 4096 Mar 28 2016 .cpt_hardlink_dir_a920e4ddc233afddc9fb53d26c392319
drwxr-xr-x 8 root root 2140 Nov 13 06:37 dev
drwxr-xr-x 98 root root 12288 Nov 13 06:37 etc
drwxr-xr-x 3 root root 4096 Oct 27 14:26 home
dr-xr-xr-x 9 root root 4096 Nov 9 20:19 lib
dr-xr-xr-x 8 root root 12288 Nov 9 20:20 lib64
drwx------ 2 root root 16384 Mar 28 2016 lost+found
drwxr-xr-x 2 root root 4096 Sep 23 2011 media
drwxr-xr-x 2 root root 4096 Sep 23 2011 mnt
drwxr-xr-x 3 root root 4096 Oct 27 14:25 opt
drwxrw---- 3 root root 4096 Oct 27 14:18 .pki
dr-xr-xr-x 92 root root 0 Nov 13 06:37 proc
-rw------- 1 root root 1024 Oct 27 14:25 .rnd
dr-xr-x--- 5 root root 4096 Nov 11 21:16 root
dr-xr-xr-x 2 root root 4096 Nov 9 20:19 sbin
drwxr-xr-x 2 root root 4096 Sep 23 2011 selinux
drwxr-xr-x 2 root root 4096 Sep 23 2011 srv
drwxr-xr-x 7 root root 0 Nov 13
drwxrwxrwt 4 root root 20480 Nov 14 22:06 tmp
drwxr-xr-x 13 root root 4096 Nov 9 20:20 usr
drwxr-xr-x 22 root root 4096 Nov 9 20:19 var

[root@server-XXXXXXX-X ~]# ls -la /httpdocs/upload/temp_image
ls: cannot access /httpdocs/upload/temp_image: No such file or directory

[root@server-XXXXXXX-X ~]# whereis convert
convert: /usr/bin/convert /usr/share/man/man1/convert.1.gz
 
Last edited:
So, in root (/) directory you do not have a httpdocs directory. That's why you get an error "No such file or directory". A correct path should be like "/var/www/vhosts/example.com/httpdocs/".
 
AYamshanov,

I tried below and had no error message. Does it mean that convert -strip command line work?

[root@server-XXXXXXX-X ~]# convert /var/www/vhosts/XXXXX.com/httpdocs/upload/temp_image/in.jpg -strip /var/www/vhosts/XXXXX.com/httpdocs/upload/temp_image/out.jpg
[root@server-XXXXXXX-X ~]#
 
Hi,

Did you get file out.jpg? This file looks like you want? If yes, then the command work :)
 
AYamshanov,

Thank you for your time. I really appreciate it.

I'm still working on this since it seems that ImageMagick command line is not eliminating exif data from jpg file.

Anyway, unless you taught me how to write the collect path not to receive an error "No such file or directory", I would not have proceeded forward to find out whether or not exif data were eliminated.

I'll keep you updated about the progress.
 
Last edited:
Back
Top