2 totof Jul 28, 2006 14:56

Thanks Totof,
That seems to have done the trick, what I don't understand is why ? I'd assumed that the group permissions being set to 7 would have allowed Apache access. Obviously it needs world access too.
Is this mentioned somewhere in the docs that I've missed ?
T.
It's mentioned in the installation instructions.
The reason why this fixes it, is by default, authoirized users are the only one with write permissions. When you are browsing normally, you have not been authorized, therefor you are a normal/casual/guest user, requiring the 777.
Good?
I've got b2e 1.8 on two servers.
Server A (purely testing) the media directory is 755 and I can upload files.
Server B (live) the media directory is 755 and I can NOT upload files or create directories.
Therefore should the media directory and all sub-folders be 777. I'm confused as to why on one server at 755 it works and doesn't work on the other.
It depends on what's the user and group owner of the directories. Is that Apache's user? (it's probably your FTP user if you've FTP-uploaded them).
You should fix the owner of all dirs below /media and change the permissions back to 755.
blueyed wrote:
You should fix the owner of all dirs below /media and change the permissions back to 755.
And how do you do that ?
All the time that I'm using b2evo, all my mediadirs allways needed 777 to work...
So I miss something...
If you had shell access, through "chown" - I don't know if it's possible at all through FTP.
Hi Steve,
The files in your account should all be owned by your username, not apache or any other user. I've taken a look at your account and the owner looks to be correct.
I'm not sure why uploads work on your test server and not on our server, but there are many things that could cause that. We are probably running a different OS or php version to your test server, which will cause different results.
I suggest you chase up the problem on the b2evolution forums as they will know more about the scripts than we do.
Cheers,
Lee
_________________
Lee Gaywood
Email: support@unlimited-space.com
I posted my original question to the my hosting provider and [url=http://unlimited-space.com/forum/viewtopic.php?p=583#583]their response[/url] is above. Where do I go from here? Any advice appreciated.
Well you could do what everyone has been doing for years (except blueyed here), and set the permissions to 777....
superjacent, are you getting the same error as TonyG above?
blueyed wrote:
superjacent, are you getting the same error as TonyG above?
I know. And why I am confused is that on a test server the permissions are 755 and no problems, yet on my live server 755 doesn't work. I'm confused why this is the case.
superjacent, again: are you getting the same error ("Warning: move_uploaded_file( ... ): failed to open stream: Permission denied in .../inc/CONTROL/files/files.php on line 1037 ")?
Yes, sorry, I miss read your reply.
I've written a script (which is attached). Put that into your blogs folder (where the media folder is) and run it from a browser.
It goes recursive through the "media" folder and outputs the perms (octal) and owner/group of the directory.
It will probably fail on a Windows server, but should work fine on Unix. So, if you cannot get the answer from the script's output, please paste it here.
Edit: I've put the script here: http://manual.b2evolution.net/Debugging#Permissions
hello blueyed,
I copied the script into my blog folder. see the output I got below.
Regards
Joe
Just for completion, here's joachim error, posted in http://forums.b2evolution.net/viewtopic.php?p=42140&highlight=#42140
Warning: move_uploaded_file() [function.move-uploaded-file]: SAFE MODE Restriction in effect. The script whose uid is 20095 is not allowed to access /srv/www/htdocs/web25/html/sniglesde/media/blogs/articles owned by uid 30 in /srv/www/htdocs/web25/html/sniglesde/inc/CONTROL/files/files.php on line 1037
The problem is:
The script is owned by web25 (uid 20095) probably, and that's probably also the case for the admin.php script, which does the upload (or the included file, dunno).
/blogs/articles, however, is owned by wwwrun and therefor the script is not allowed to access it.
Your host seems to have a bad PHP setup (typically for mod_php): all PHP processes run as wwwrun and therefor also the media dirs, that got created by them, are owned by them.
Possible solution: manually create the "articles", "all" etc folders through FTP - then the owner should be web25 for them.
Long term solution: b2evo could try to chown the folders after they have been created, but that may not be possible. And the PHP manual even says:
Note: When safe mode is enabled, PHP checks whether the files or directories you are about to operate on have the same UID (owner) as the script that is being executed.
A solution might be to set the "sticky bit" on your document root's folder: then new files will be owned by the owner of the directory and not the process/user that created them. See http://de.php.net/manual/en/features.safe-mode.php#55581 - it probably means that your host would have to do this, if FTP does not support it (PHP's chmod() function does not support it).
Hope that helps.
perfect it works! I copied the files via FTP and now I can upload files!!
many thanks
joachim!!! :lol: :lol: :lol: :lol:
Holy cr**
Blueyed did it again!
myself, admin, can upload files, but bloggers can not upload files :(
anything to change in the backoffice?
yes
euh..
goto the blogs tab
group permissions, or user permissions
click on 'wide'
there you'll see the boxes to tack for the media permissions
I can not save any permissions after I click to "save".
Cannot confirm it - just tested it on the demo site.
What happens, if you click "Save"? Does it say "Updating Blog [XXX]..."?
ye it shows "updating [blog xyz]"
the radio button is correct postion, but after I visit again the "group permission" the radio button is on the position before the change
Joachim,
I still had admin rights from yesterday,
I went into your backoffice
and I'm able to click on save... (even the button is in german)...
Are you still having problems ???
Might be a browser cache issue then - so that the browser does not get the fresh page.
Does pressing Shift/Ctrl-F5 fix it?
It´s a "logical" problem. it works now. topanga fixed it in my backoffice :)
"logical" as in "usability"? If so, please tell us, so this might get improved.
To change the rights, you have to do it in 3 different places..
First the normal on the blogsettings :
group rights
user rights
Then the tricky one :
On the users tab
Click on the group where the user is in
Make shure he can edit files...
Topanga wrote:
yes
euh..
goto the blogs tab
group permissions, or user permissionsclick on 'wide'
there you'll see the boxes to tack for the media permissions
:D Yes, yes, yes! That worked for me! Thanks a lot!
Hi,
I've upgrated from 1.6 to 1.8 and have no problems with these directories.
Verify that they are in chmod 777
Regards.