[SOLVED] Problem with file permissions in PHP on Linux
ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
The thing is that I can't edit the copied file once created, (with the same user www-data !! ). So there is an error when the code tries to crop or resize it subsequently.
what return code do you get from _crop_image?
also is it possible _process_image is not closing file resource appropriately..
_crop_image returns true if the image is cropped, and false if there was a problem
I don't think _process_image is not closing the file resource properly. Both functions use a method of the CodeIgniter Image Manipulation class, which encapsulates everything. So it is not likely to be the problem...
Why don't you try save the output image to different name and check if your production server has the same GD library as testing.
That way you could eliminate errors ...
dive: This is the list line corresponding to the containing folder:
Code:
drwxrwxrwx 2 desarrollo desarrollo 4096 2012-03-14 13:31 novedades
It's owned by another user ("desarrollo") but all the premissions are granted to everyone. I also added +x just in case. I'm not good on Linux yet.
lithos: you've been very helpful. I've echoed the phpinfo from both the development and production server and while the first one has gd enabled, the second one doesn't specify anything about gd. So is it possible that it has nothing to do with premissions but with the GD library? If the gd library is not installed, why did the copy work?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.