Recent Topics

[2.4.0] The blog's media directory could not be created

Started by on Feb 25, 2008 – Contents updated: Feb 25, 2008

Feb 25, 2008 11:02    

My b2evolution Version: 2.4.0

After having upgraded from vers. 0.9 to vers. 2.4, I suddenly find the following error message (for each one of my blogs) in Dashboard > Files:

The blog's media directory «media/blogs/blogname/» could not be created, because the parent directory is not writable or does not exist.

.

So far. my new vers. seems to work perfectly. I tried a lot of new functions, I am able to write new posts and if anything is not working correctly, I don't know it yet.

When upgrading, I followed the installation instructions: "Delete all your old folders, except for "Media", and then upload all folders from "Blogs"..." etc.

My question is now: Do I really have a problem with my media directory ? Or did I get the error message(s) simply because I left the old media folder in my new version ? I already read your doc. http://manual.b2evolution.net/Media_file_permission_errors but before contacting my hosting provider, I'd like you to say that I can ignore the error message..... :-/

Feb 25, 2008 15:25

If you have the ability to change the permissions on your media folder (eg using chmod at a command prompt; or with a FTP interface) and all subfolders, change them all to allow the server to write. 777 will do the trick although if you can get away with a stricter permission then do so. [url=http://manual.b2evolution.net/Directory_and_file_permissions]Lots more guidance here.[/url]

Feb 27, 2008 13:58

I have no idea of what I've been doing (trying to follow the instructions of http://manual.b2evolution.net/Directory_and_file_permissions) but all the red error messages in Dashboard/Files have now changed into green messages like this: "The blog's media directory «media/blogs/blogname/» has been created with permissions 775"

In the chmod I thought that I chose "777" for all my stuff in blogs/media/blogs and blogs/media/users.

In ftp I checked all 9 boxes in each folder, but maybe I've now been permitting too much ?

Who can tell me if everything in regard to permissions of my blog is now ok or... ?

Feb 27, 2008 14:12

Hi dk,

If the folder permissions are set to 775 *and* you can upload to the folders using the file manager then everything is fine.
If you cannot upload to the /media/ folder then you want to change the setting to 777 for the media folder. That is a broader permission. There are no real security issues that I know of, but 775 is a tad safer.

Good luck

Feb 27, 2008 17:46

(I think) I just changed the permissions from 775 to 777. Still, however, I get the following message when, in Dashboard/Files, I try to upload an ordinary file (.gif or .doc) from my harddisk:

Warning: move_uploaded_file(): SAFE MODE Restriction in effect. The script whose uid/gid is xxxxxx/xxxxxx is not allowed to access /hsphere/local/home/xxxx/xxx.xxxxx.dk/blogs/media/blogs/xxx owned by uid/gid xxx/xxx in /hsphere/local/home/xxxx/xxx.xxxx.dk/blogs/inc/files/upload.ctrl.php on line 334 Warning: Cannot modify header information - headers already sent by (output started at /hsphere/local/home/xxxxx/xxx.xxxx.dk/blogs/inc/files/upload.ctrl.php:334) in /hsphere/local/home/xxxx/xxx.xxxxx.dk/blogs/inc/_core/_template.funcs.php on line 133

Where am I ??

Can I live with not being able to upload directly from Dashboard/Files......if I can upload files with ftp and take them to my blog posts from there (writing the path in the box from Write/img) ? :roll:

Feb 27, 2008 17:54

You must also look at the permissions for the folders /media/blogs/ and /media/blogs/xxx/

Yes you are perfectly happy if you upload the movies through ftp and link them in your post. You don't need this feature, but if you get it to work the way you want it's easier.

Good luck

Feb 27, 2008 17:58

The error message identifies a possible issue: php safe mode is on. There may be others who can suggest differently but I find that 2.4 will not work for me with safe mode on, so I invariably turn it off. Depending on your hosting you may be able to do this in your host control panel; or if not then include this line in your .htaccess file:

php_flag safe_mode off

There are, as you'd expect from the name, security issues concerning turning off safe mode. Some people advise against it. You might want to google it if you're bothered.

Feb 27, 2008 18:04

Thanks Spiderman (Tickman),

That's a valuable addition. I overlooked it. With safe mode "on" you are very restricted in your possibilities.

Good luck

Feb 27, 2008 18:39

THANK YOU !!!

Until I've become more familiar with the safe mode and other b2evolution things, I'll just leave my permissions as they are.


Form is loading...

Run your own website! – This forum is powered by b2evolution CMS, a complete engine for your website.