Fail to make WP set the umask I want
-
Hi all!
I’ve recently installed a WordPress Multisite install to run a shared server for a group of my clients.
I’m having trouble making wordpres use the umask I’ve set on my server.
Here’s more detail of my tech stack before I go on
Ubuntu 12.04, on Amazon EC2
Most recent version of Apache2, PHP and MySQLI’ve added umask 007 to /etc/apache2/envvars wich make apache set file to 660 and folder to 770 on creation. I’ve tested it with PHP native functions and it works.
But when I install/upgrade themes and plugins file permissions are set to 644 and folder to 755, wich is giving me problems since I need everyone in the group i’ve set to write on the files.
The owner are set correctly, wich is www-data:www (www is a group i created).
So basicaly WordPress bypass my config file.
I’ve try creating a plugin function
wpblog_fix_umask(){ umask('007'); } add_action( 'init', 'wpblog_fix_umask' );
Doesn’t work.
Tried adding umask(‘007’) in the wp-config.php. Doesn’t work either.
Any one have any suggestion?
Google doesn’t help by the I’ve been searching for over 4 hours :p
Thanks!
- The topic ‘Fail to make WP set the umask I want’ is closed to new replies.