jedson Hi -- Got my re-designed site up and almost everything works. One glitch. It won't upload images. I can put an image in the right file (using my ftp program -- K-Bear) and then use the dokuwiki based program to insert it into the article where I want it. But when I try to use the program to upload an image from my own computer I get a message that says, "upload failed -- maybe wrong permissions." (This is true even if the image on my computer is set at 0777). It tells me that permission is denied and refers me to line 120 in lib/exe/media.php. On that line I find the beginning of this command: if(move_uploaded_file($file['tmp_name'], $fn)) { // set the correct permission here chmod($fn, 0777 - $conf['umask']); Looking at the dokuwiki.php file I find that umask is set at 0111 and dmask at 000. All this is over my head, but I think this may be the relevant info. What do I need to do? jedson
purplepaisley Have you chmoded the media directory (and subdirectories) of your dokuwiki installation? chmod 777 data/media
jedson Double checked that. Both files and their contents are 777 and it still won't upload. Get the same message. Jedson
walfisch moin. i have the same problem on our new wiki. your questions brings me on the right way to find an resolution for that bug. (i'm not a php-programmer !!) problem: after uploading the file, the protection setting works buggy and sets the permission to --- --- ---. user and group settings are correct. 1) line 120 looks differnet from yours. the same code if(move ... begins at line 125 (different wiki versions ??) 2) line 122 chmod..... looks different from my code in line 127 => if($conf['fperm']) chmod($fn, $fperm); 3) i don't know, where $fperm is defined (but not in dokuwiki.php , local.php or media.php) 4) in my wiki release file and directory protection are defined in dokuwiki.php or local.php $conf['fmode'] = '640'; $conf['dmode'] = '750'; a possible resolution for that problem in my release is: 5) replace the chmod line with the following 2 lines: $fperm = $conf['fmode']; => sets fperm to the value of fmode chmod($fn, $fperm); => protects the file $fn to the rights of $fperm = $fmode hint: don't set your directory's to mode=777, because is a security whole and allows everybody on the system to do anything. set the protections like defined in dokuwiki.php / local.php and follow the readme's for correct installation
jedson Useful information. However, when I substituted the scrip you sent it didn't do the trick for me. As you point out, I am not using the latest update for my site. I think I will use a test site I have to do the update and see how it works them. If it doesn't work with just the update I can try your script on the updated program. And see what that does. (You are more of a programmer than I am.) Jedson
p3aul When I've tried setting permissions and they don't work(dukiowiki) I have had some success with deleting the .htaccess file(s) Paul