Page 1 of 1

Again permissions

Posted: Sun Apr 26, 2009 4:25 am
by matthijs
So I have this wordpress install which has an upload feature. It wants to upload to directory /wp-content/uploads/

Now the only way I can have the uploads work is set that folders permissions on 777. I don't want that.

What else can I do?

The owner and group of that folder is "ftp"

Re: Again permissions

Posted: Sun Apr 26, 2009 4:43 am
by kaisellgren
Ah, the lovely WordPress :)

Well, as for the file permissions, I think 0666 will work fine. If it does, then try 0660, but I doubt anything lower works, because I think you are not in the right group... you can't get tighter permissions than that.

It hurts my eyes to see this path /wp-content/uploads/ :cry:

Re: Again permissions

Posted: Sun Apr 26, 2009 4:53 am
by matthijs
But that's the thing. Only 777 works.
666: not
766: not
776: not
777: works

And this, on a (shared) server with which I yesterday had another problem thanks to mod_security being enabled on that server. I asked th host if that could be disabled, but that wasn't possible "Because of the security". But now at the same time I am forced to make folders 777 to use my site...

[edit]
775: works
755: works as well

So for now I'll keep with 755 I think

Re: Again permissions

Posted: Sun Apr 26, 2009 5:02 am
by kaisellgren
I don't know what mod_security does, but I wonder why it restricts you to stick with so loose file permissions.

0755 is an odd file permission. Does 0751 work? Try 0640, too.

I use 0400 often myself on my VPS :P

Re: Again permissions

Posted: Sun Apr 26, 2009 5:10 am
by matthijs
Mod_security is an apache module which acts as some kind of firewall. It checks every request and filters that based on certain rules. However, it's kind of arbitrary what those rules are. So they can be too restrictive. For example, I was able to create a new post in wordpress. However, then updating that post was not allowed thatks to the mod_security thinking it was a dangerous request...

Anyway:
0751 works
0640 works not

Re: Again permissions

Posted: Sun Apr 26, 2009 5:22 am
by kaisellgren
matthijs wrote:updating that post was not allowed thatks to the mod_security
:crazy:
matthijs wrote:0751 works
0640 works not
That's weird. I wonder why files have to have the execution permission.