开发者

"zip I/O error: Permission denied" with exec command

开发者 https://www.devze.com 2023-03-18 13:20 出处:网络
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 erro

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:

  1. The web server user ID doesn't have permission to write out the .zip you're generating
  2. The web server user ID doesn't have permission to read a file/directory somewhere in the area you're zipping up.
0

精彩评论

暂无评论...
验证码 换一张
取 消