News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

File permission error. (File permission page makes error)

Started by NekoJonez, June 21, 2013, 07:35:22 AM

Previous topic - Next topic

NekoJonez

http://www.arpegi.be/index.php?action=admin;area=packages;sa=perms;****

2: is_dir(): open_basedir restriction in effect. File(/customers/b/f/a/arpegi.be/httpd.www/..) is not within the allowed path(s):

(/customers/b/f/a/arpegi.be/httpd.www:/customers/b/f/a/arpegi.be/httpd.private:/customers/b/f/a/arpegi.be/tmp:/customers/arpegi.be/arpegi.be:/var/www/diagnostics:/usr/share/php)

/customers/b/f/a/arpegi.be/httpd.www/Sources/Packages.php

Line: 1877


I have this error, what can I do about it?

I use SMF 2.0.4 and I get this error as soon as I access the file permission page.
Retro video game blogger, writer, actor, podcaster and general amazing dude.

Twitter
My Blog

kat

Slap your host. ;)

Get them to disable the pathetic pile of poo that is "mod_security" and ask them to ensure that you have full CHOWN ownership of the files on your site.

NekoJonez

Can I check myself if I have some files not good in terms of permissions?
Retro video game blogger, writer, actor, podcaster and general amazing dude.

Twitter
My Blog

kat

Nope.

CHMOD permissions, which you control, are overridden by CHOWN permissions, which your host controls.

NekoJonez

Alright, I'm currently talking to the host. I'll keep you guys up to date.
Retro video game blogger, writer, actor, podcaster and general amazing dude.

Twitter
My Blog

kat



Don't forget the "mod_security" thing, too. If that's not affecting this, it WILL affect you, eventually, coz it's downright dumb.

NekoJonez

Can it also be possible that a CHMOD is wrong at my end?
Retro video game blogger, writer, actor, podcaster and general amazing dude.

Twitter
My Blog

kat

Easy way to find out.

Admin>Package Manager>File permissions.

Try setting that to "Standard". :)

Looking at the error you're getting, though, I doubt it's your permissions.

NekoJonez

After changing the permissions to standard, I got the error 7 times ._.
Retro video game blogger, writer, actor, podcaster and general amazing dude.

Twitter
My Blog


NekoJonez

On it!

They said it should be done in a hour. They did the changes.

Let's hope that fixes it.
Retro video game blogger, writer, actor, podcaster and general amazing dude.

Twitter
My Blog

kat

Yay!

I'm surprised some hosts don't have things set, that way, as standard, really. It'd save them from a lot of grief. ;)

MrPhil

If /customers/b/f/a/arpegi.be/httpd.www/ is your site root ("/"), who is trying to do an is_dir() call on relative path ".."? That would put you at /customers/b/f/a/arpegi.be/, which not surprisingly, you may not be given access to (at least, through PHP). It's possible that you've got something misconfigured somewhere as "..".

Do go ahead and turn off mod_security anyway -- it's worse than useless. But, I doubt that will fix this particular problem.

NekoJonez

Quote from: MrPhil on June 21, 2013, 04:32:31 PM
If /customers/b/f/a/arpegi.be/httpd.www/ is your site root ("/"), who is trying to do an is_dir() call on relative path ".."? That would put you at /customers/b/f/a/arpegi.be/, which not surprisingly, you may not be given access do (at least, through PHP). It's possible that you've got something misconfigured somewhere as "..".

Do go ahead and turn off mod_security anyway -- it's worse than useless. But, I doubt that will fix this particular problem.

Well, how can I adjust this fix?

Quote from: K@ on June 21, 2013, 08:46:10 AM
Yay!

I'm surprised some hosts don't have things set, that way, as standard, really. It'd save them from a lot of grief. ;)

Their change didn't help. :/
Retro video game blogger, writer, actor, podcaster and general amazing dude.

Twitter
My Blog

MrPhil

action=admin;area=packages;sa=perms;****
Did you replace some real term by **** to conceal something?

QuoteWell, how can I adjust this fix?
I'll have to defer to someone more familiar with the innards of this command, to figure out why it's doing an is_dir() against "..". I can't imagine a legitimate reason to do that (.. is always going to be a directory, unless you're already at /).

kat

That "2: is_dir(): open_basedir restriction in effect." error suggests, to me, that something is trying to open a file that is not in your open_basedir allowed directory.

To correct that, I believe you'll need to edit php.ini, where there'll be a line like this:

open_basedir = "/path/to/first/folder:/path/to/second/folder" which seems to be pointing to a "tmp" directory which is either in the wrong place, or is write-protected.

I have access to that directory, so I can change it's permissions. But, I suspect that most people don't.

If I'm right, with that, you'll either need to ask your host to edit php.ini, to correct the path, or change the permissions to the directory, so that you can use it.

NekoJonez

Quote from: MrPhil on June 23, 2013, 11:53:35 AM
action=admin;area=packages;sa=perms;****
Did you replace some real term by **** to conceal something?


Not really, it's sometimes different. I thought it would have posed a security issue form my forum.

Quote from: K@ on June 23, 2013, 01:24:03 PM
That "2: is_dir(): open_basedir restriction in effect." error suggests, to me, that something is trying to open a file that is not in your open_basedir allowed directory.

To correct that, I believe you'll need to edit php.ini, where there'll be a line like this:

open_basedir = "/path/to/first/folder:/path/to/second/folder" which seems to be pointing to a "tmp" directory which is either in the wrong place, or is write-protected.

I have access to that directory, so I can change it's permissions. But, I suspect that most people don't.

If I'm right, with that, you'll either need to ask your host to edit php.ini, to correct the path, or change the permissions to the directory, so that you can use it.

I'll ask this soon.
Retro video game blogger, writer, actor, podcaster and general amazing dude.

Twitter
My Blog

NekoJonez

Quote from: K@ on June 23, 2013, 01:24:03 PM
That "2: is_dir(): open_basedir restriction in effect." error suggests, to me, that something is trying to open a file that is not in your open_basedir allowed directory.

To correct that, I believe you'll need to edit php.ini, where there'll be a line like this:

open_basedir = "/path/to/first/folder:/path/to/second/folder" which seems to be pointing to a "tmp" directory which is either in the wrong place, or is write-protected.

I have access to that directory, so I can change it's permissions. But, I suspect that most people don't.

If I'm right, with that, you'll either need to ask your host to edit php.ini, to correct the path, or change the permissions to the directory, so that you can use it.
They can't/refuse to do this.
Retro video game blogger, writer, actor, podcaster and general amazing dude.

Twitter
My Blog

Kindred

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

kat

That's plain ridiculous.

Yeah, a better host required, methinks.

MrPhil

Where did all this discussion about "tmp" directories come from? The error message very clearly shows that it's trying to an is_dir() on /customers/b/f/a/arpegi.be/httpd.www/.. which is out of the allowed range of directories (it would be one above /, or /customers/b/f/a/arpegi.be/). So, the question is why is_dir("..")? Something has got to be misconfigured in SMF.

Advertisement: