Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Wed Dec 08, 2010 3:04 pm 
Offline
Senior Newbie

Joined: Fri Dec 18, 2009 1:38 am
Posts: 9
Hello everyone,

I've been searching for the solution to this problem on the web for some time, and finally figured I'd pose the question here in the hopes that someone else has resolved it.

The issue is this: On my Linode, I'm running Ubuntu 10.04 with Apache 2.2.14 and mod_dav. One of the things I use this for is to sync Firefox bookmarks and hit the JSON file with a Perl script that generates a nice clean HTML file, complete with collapsing folders and all. It's very useful when I'm somewhere on a browser that doesn't have my bookmarks.

The problem is that as a DAV folder, the bookmarks are being written with no group access whatsoever. Essentially, the umask is being set to 077. I've found hundreds of links online that suggest adding a line to the end of /etc/inid.d/apache2 like the following:
umask 002
and a great many people appear to be getting satisfaction from that fix, even on Ubuntu 10.04. Not me.

I've also tried adding this line to /etc/apache2/envvars as well as /etc/profile and even /usr/sbin/apache2ctl. All to no avail.

It seems that the umask in the version of Apache I'm running is resetting its umask *after* the umask command I'm inserting into the various scripts.

Short of poring through the Apache and mod_dav code to generate a custom patch, does anyone have a configuration change of some kind that will work?

I am not willing to use a cron job to run chmod every so often, primarily because this is relatively heavy in resource use - the file in question might only be updated once every week or more, though I want the html generator to be able to do this quickly (within a few hours).

Many thanks in advance,
Lou


Top
   
 Post subject:
PostPosted: Sun Mar 13, 2011 1:15 pm 
Offline
Newbie

Joined: Sun Mar 13, 2011 1:09 pm
Posts: 2
Hey,

I'm having absolutely the same issue, tried the same remedies that you described, but nothing worked as well.

Will be grateful to anyone, who could suggest the solution.


Top
   
 Post subject:
PostPosted: Sun Mar 13, 2011 3:40 pm 
Offline
Senior Member

Joined: Wed Mar 03, 2010 2:04 pm
Posts: 111
What if you setgid on the directory? I had to do that so that files created by my perl scripts would be in the www-data group, or else Apache couldn't read them.

chmod g+s <directory>

Any files and subdirectories would inherit the group ID of that directory. May be security implications to this, if it even helps at all.


Top
   
 Post subject:
PostPosted: Sun Mar 13, 2011 8:17 pm 
Offline
Newbie

Joined: Sun Mar 13, 2011 1:09 pm
Posts: 2
haus wrote:
What if you setgid on the directory? I had to do that so that files created by my perl scripts would be in the www-data group, or else Apache couldn't read them.

chmod g+s <directory>

Any files and subdirectories would inherit the group ID of that directory. May be security implications to this, if it even helps at all.


Haus, thanks for your suggestion! I gave it a try, and actually was full of hope it would help, but unfortunately it didn't. The new file came up with -rw------- as usual.

So far the only remedy I could find is to put chmod command into crontab, which is nothing but a nasty hack :(


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group