I'm trying to recursively zip a directory with the exec
command, first of all I do not need the zipArchive
class for outline reasons however when I pass this command in the exec
command I get an error saying:
zip I/O error:开发者_StackOverflow Permission denied
For this command:
cd ../../; zip -P temppassword html/acp/backup/filename.zip -r html/ 2>&1
It starts out in the script located /var/www/html/acp/config.php
and it will move to the www
directory after cd ../../
, then zip up the html
directory and store the zip file into /var/www/html/acp/backup/
directory. But unfortunately I get a permission error. How can I allow the command to pass through with "permission"?
Could be either:
- The web server user ID doesn't have permission to write out the .zip you're generating
- The web server user ID doesn't have permission to read a file/directory somewhere in the area you're zipping up.
精彩评论