PHP Thumb » Help & Bugs » Help

save files- permissions

(5 posts)
  1. alex
    Member

    When using the file save functions, the permissions are set in a way that I can't delete file via FTP. Is there a setting to change the default permissions?

    Posted 1 year ago #
  2. There currently isn't, and I'll tell you why... many people are pretty hesitant to let any libraries automatically set permissions (which is why the "correctPermissions" option is set to false in the library). Another reason is that more often than not, PHP simply isn't allowed to change file permissions (depends on your php.ini).

    That being said, you should be able to change the permissions yourself first and then delete the images... but that depends on your hosting environment. You could give it a shot programmatically if you'd like, check out the chmod & unlink functions in PHP

    Posted 1 year ago #
  3. alex
    Member

    (which is why the "correctPermissions" option is set to false in the library).

    Your documentation says it's true by default. http://trac.gxdlabs.com/projects/phpthumb/wiki/Docs/GettingStarted#Options

    Anyway, it's not the permission attributes that are the problem, but the file owner. It's being set to Apache, so I can't change the permissions from in my ftp software.
    Is there a way to get around this?

    Posted 1 year ago #
  4. Fixed the docs, thanks!

    Well, you could either add your user to the group that Apache is using (wouldn't really do that myself, but it's certainly a valid solution), or ssh into the machine and get rid of them manually (via sudo / root user... brute force!)

    Posted 1 year ago #
  5. alex
    Member

    Unfortunately I don't have that kind of access to the server. I will solve it programmatically. Thanks.

    Posted 1 year ago #

RSS feed for this topic

Reply

You must log in to post.