1 tonyg Jul 28, 2006 10:17
3 tonyg Jul 28, 2006 15:36
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.
4 balupton Jul 28, 2006 21:46
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?
5 superjacent Jul 30, 2006 14:41
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.
6 blueyed Jul 30, 2006 15:00
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).
7 blueyed Jul 30, 2006 15:01
You should fix the owner of all dirs below /media and change the permissions back to 755.
8 topanga Jul 30, 2006 15:36
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...
9 blueyed Jul 30, 2006 15:49
If you had shell access, through "chown" - I don't know if it's possible at all through FTP.
10 superjacent Aug 04, 2006 10:19
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.
11 balupton Aug 04, 2006 10:21
Well you could do what everyone has been doing for years (except blueyed here), and set the permissions to 777....
12 blueyed Aug 04, 2006 16:32
superjacent, are you getting the same error as TonyG above?
13 superjacent Aug 05, 2006 03:56
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.
14 blueyed Aug 05, 2006 04:53
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 ")?
15 superjacent Aug 05, 2006 08:57
Yes, sorry, I miss read your reply.
16 blueyed Aug 05, 2006 18:25
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
17 joachim Aug 17, 2006 06:46
hello blueyed,
I copied the script into my blog folder. see the output I got below.
Regards
Joe
18 blueyed Aug 17, 2006 20:30
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.
19 joachim Aug 18, 2006 07:56
perfect it works! I copied the files via FTP and now I can upload files!!
many thanks
joachim!!! :lol: :lol: :lol: :lol:
20 topanga Aug 18, 2006 08:54
Holy cr**
Blueyed did it again!
21 joachim Aug 18, 2006 10:17
myself, admin, can upload files, but bloggers can not upload files :(
anything to change in the backoffice?
22 topanga Aug 18, 2006 12:06
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
23 joachim Aug 18, 2006 12:32
I can not save any permissions after I click to "save".
24 blueyed Aug 18, 2006 17:38
Cannot confirm it - just tested it on the demo site.
What happens, if you click "Save"? Does it say "Updating Blog [XXX]..."?
25 joachim Aug 18, 2006 21:37
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
26 topanga Aug 18, 2006 22:06
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 ???
27 blueyed Aug 19, 2006 00:43
Might be a browser cache issue then - so that the browser does not get the fresh page.
Does pressing Shift/Ctrl-F5 fix it?
28 joachim Aug 19, 2006 07:06
It´s a "logical" problem. it works now. topanga fixed it in my backoffice :)
29 blueyed Aug 19, 2006 08:17
"logical" as in "usability"? If so, please tell us, so this might get improved.
30 topanga Aug 19, 2006 10:49
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...
31 suzan Aug 20, 2006 20:27
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.