简体   繁体   中英

Permission denied error calling fopen

I use XAMPP on Leopard. I'm trying to create cache files using fopen but I get

Warning: fopen(/Applications/xampp/xamppfiles/htdocs/mysite/cache/index.php.cache) [function.fopen]: failed to open stream: Permission denied in /Applications/xampp/xamppfiles/htdocs/mysite/functions.php on line 26

I tried to change folder permissions using CMD+I in finder and setting read/write access for everyone, but did not work.

Got any ideas?

Thanks!

You need to change permissions for that file, no the folder.

Anyway, if you try to change permissions but can't do it, maybe that means you don't have permissions to chmod at all!

If you have administrative privileges, try sudo chmod in terminal.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM