0

Hello there. I would like to know if there is a way to write files to my server without CHmodding a certain directory. I have an auto-update script that downloads a .ZIP from my main server, and then extracts those file to the corresponding directories on the current server. However, I'm getting a permission denied error:

Warning:  ZipArchive::extractTo(../../../../index.php) [ziparchive.extractto]: failed to open stream: Permission denied in /var/www/vhosts/cms.com/httpdocs/cms/includes/modules/update/actions/update.action.php on line 149

I don't get this error after CHmodding the directory to 0777. But I don't want to CHmod ALL my directories. That wouldn't be safe, would it? Is there a workaround? Something to change in my PHP settings?

2
Contributors
2
Replies
6
Views
5 Years
Discussion Span
Last Post by minitauros
1

have you tried doing a chown apache:apache actions? (assuming that apache is running as user apache)

0

No I have not :). What does that do? Change the owner of the files? Thanks for the reply!

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.