Hello Magickwand and php group,
I am having trouble setting permissions correctly so that the magickwand api (php 5.2) can read and
write images. I usually read a file from one directory, create a magickwand resource from that file,
and transform the image, and save the new image with a new name to a different directory.
I have seen that my file and folder permissions when set incorrectly, will definitely cause problems!
Below is a copy of an error message I get when I try to read an image and write, etc.
Fatal Error: magickreadimage(): C API cannot read the file
"/usr/local/apache2/htdocs/portfolios/25/coffeeandcars.JPG"
(reason: unable to open image `/usr/local/apache2/htdocs/portfolios/25/coffeeandcars.JPG':
Permission denied) [on C source line 392] (# 256).
Error in line 58 of file '/usr/local/apache2/htdocs/portfolios/thumbmaker.php'.
Script: '/portfolios/thumbmaker.php'.
I have tried setting the owner and group to apache.apache, and apache.webdev (webdev is a group I created, where the apache user and another user are a member). I am running the Apache web server as the user "apache".
Any suggestions on the correct permissions to get the read and writes to work??
thanks,
eholz1
Correct permissions for reading and writing images
Re: Correct permissions for reading and writing images
Hello,
Be sure to check if your apache user is also able to read and write files from the specified directories.
Can you post your current folder permissons?
squig
Be sure to check if your apache user is also able to read and write files from the specified directories.
Can you post your current folder permissons?
squig
Re: Correct permissions for reading and writing images
hello squig
here are the permissions for the folder (25):
drw-rw-rw- 3 apache webdev 4.0K Mar 15 09:59 25
and here are the permissions for the files under "25" 25/...
-rwxrwxrwx 1 apache webdev 69K Mar 15 09:55 coffeeandcars.JPG
-rwxrwxrwx 1 apache webdev 69K Mar 15 09:59 son_cher.jpg
drwxrwxrwx 2 apache webdev 4.0K Mar 15 09:43 thumbs
-rwxrwxrwx 1 apache webdev 197K Mar 15 09:57 xcoffee.JPG
I have also tried using owner: apache and group: apache - with similar results, no can read/write
I am running Fedora Core 6, and if I use the gui to set permissions, the owner: Create and Delete
for folders, and owner: r/w for image files, and group (webdev) r/w for image files. I wonder if there is some sort of conflict between setting permissions from the command line as opposed to using the Gnome filebrowser, and the right-click, etc??
Thanks,
eholz1
here are the permissions for the folder (25):
drw-rw-rw- 3 apache webdev 4.0K Mar 15 09:59 25
and here are the permissions for the files under "25" 25/...
-rwxrwxrwx 1 apache webdev 69K Mar 15 09:55 coffeeandcars.JPG
-rwxrwxrwx 1 apache webdev 69K Mar 15 09:59 son_cher.jpg
drwxrwxrwx 2 apache webdev 4.0K Mar 15 09:43 thumbs
-rwxrwxrwx 1 apache webdev 197K Mar 15 09:57 xcoffee.JPG
I have also tried using owner: apache and group: apache - with similar results, no can read/write
I am running Fedora Core 6, and if I use the gui to set permissions, the owner: Create and Delete
for folders, and owner: r/w for image files, and group (webdev) r/w for image files. I wonder if there is some sort of conflict between setting permissions from the command line as opposed to using the Gnome filebrowser, and the right-click, etc??
Thanks,
eholz1
Re: Correct permissions for reading and writing images
Hello,
I'm sorry for not answering sooner.
There shouldn't be any type of conflict by setting file permissions with different tools.
I also haven't any idea why there is this read/write conflict. For me the permissions just like fine.
Squig
I'm sorry for not answering sooner.
There shouldn't be any type of conflict by setting file permissions with different tools.
I also haven't any idea why there is this read/write conflict. For me the permissions just like fine.
Squig