mogrify is not preserving file permissions
Posted: 2016-02-07T05:48:19-07:00
Hi,
I'm using mogrify to crop images. These images are located in /tmp directory. Before using mogrify images have file permissions 600. After using mogrify file permissions changed to 644. This is a serious problem for me because now the images are world readable and I'm on a shared system.
Is this behaviour intended? How can I preserve file permissions?
More informations below:
I'm using mogrify to crop images. These images are located in /tmp directory. Before using mogrify images have file permissions 600. After using mogrify file permissions changed to 644. This is a serious problem for me because now the images are world readable and I'm on a shared system.
Is this behaviour intended? How can I preserve file permissions?
More informations below:
Code: Select all
vagrant@vagrant-ubuntu-trusty-64:/vagrant$ mogrify --version
Version: ImageMagick 6.7.7-10 2014-03-06 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2012 ImageMagick Studio LLC
Features: OpenMP
vagrant@vagrant-ubuntu-trusty-64:/vagrant$ chmod 600 red10x10.png
vagrant@vagrant-ubuntu-trusty-64:/vagrant$ stat red10x10.png
File: ‘red10x10.png’
Size: 318 Blocks: 8 IO Block: 4096 regular file
Device: 19h/25d Inode: 3371 Links: 1
Access: (0600/-rw-------) Uid: ( 1000/ vagrant) Gid: ( 1000/ vagrant)
Access: 2016-02-07 13:42:54.000000000 +0100
Modify: 2016-02-07 13:42:54.000000000 +0100
Change: 2016-02-07 13:45:06.000000000 +0100
Birth: -
vagrant@vagrant-ubuntu-trusty-64:/vagrant$ mogrify -crop 10x10+0+0 red10x10.png
vagrant@vagrant-ubuntu-trusty-64:/vagrant$ stat red10x10.png
File: ‘red10x10.png’
Size: 318 Blocks: 8 IO Block: 4096 regular file
Device: 19h/25d Inode: 3372 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 1000/ vagrant) Gid: ( 1000/ vagrant)
Access: 2016-02-07 13:45:13.000000000 +0100
Modify: 2016-02-07 13:45:13.000000000 +0100
Change: 2016-02-07 13:45:13.000000000 +0100
Birth: -