“Error, the file permissions could not be set” is usually a problem with the folder-persmissions on your upload folder. Can you list the permissoins each uploadfolder has?
Typical solution:
Try doing a chmod +w /wp-content/uploads on your server, this might resolve the problem. This is done often through FTP programmes, select the folder and find the “Folder attribute” option in you FTP programme.
Thread Starter
Xi
(@liuxi0099)
Thanks!
The gallery path is set as “gallery/id_%BLOG_ID%/”. The permissions of the folder “/gallery” and its sub-folders are all 755 or drwxr-xr-x. I guess the permissions are enough. But I cannot upload still.
The permissions, unless php is running as root (highly unlikely) is not enough. The file permissions are simple sets of three, ReadWriteExecute – again in pairs of three, Owner, Owners Group, Anyone, in your case: Owner: ReadWriteExecute; Group: ReadExecute; Anyone: ReadExecute;
Most likely the user PHP/Apache is not the owner of the folder. Therefore enable write for group/anyone.
Thread Starter
Xi
(@liuxi0099)
Thread Starter
Xi
(@liuxi0099)
I’ve tried uploading image on single site running on LAMP with the folder permission 755. No error. Thus, I guess the multisite function of nextgen may have some bugs.
Meanwhile, 777 may be too dangerous(?)
Still looking for help.
Thread Starter
Xi
(@liuxi0099)
OK, I’m confused. Uploading to multisite on my LAMP testing server has no error.
Thread Starter
Xi
(@liuxi0099)
Let me clarify my problem. Finally, I found same function in /admin/functions.php has different result in my testing server and formal server: nggAdmin::chmod($dest_file) is 1 in testing server, but null in formal server.
What should I do? 🙁
Thread Starter
Xi
(@liuxi0099)
Finally, I hope Alex can solve this problem. I guess it is the problem of virtual path using in the virtual server (more likely in cheap server). To hack this “cannot upload image problem”, you don’t need to change the permission of your folders. In the /admin/functions.php, just remove:
if ( !nggAdmin::chmod($dest_file) ) {
nggGallery::show_error(__(‘Error, the file permissions could not be set’,’nggallery’));
continue;
}
Remember, these lines occur twice in the /admin/functions.php. Good luck!
BTW, thanks to wptorgue again.