Tags:
create new tag
view all tags

Question

UI::Manage sets a new WEB directory permissions to 775 by default:

sub _createEmptyWeb {
  my ( $theWeb ) = @_;

  my $dir = "$TWiki::dataDir/$theWeb";
  umask( 0 );
  unless( mkdir( $dir, 0775 ) )

We maintain our TWiki content in an NFS mounted partition and would like to prevent prying eyes from accessing TWiki content via mechanisms other than TWiki. Are there any potential known programmatic issues if the permissions mask were changed to "770" such that only the owner:group can access the web directories? Our Apache runs as nobody:nobody

Environment

TWiki version: TWikiRelease04Sep2004
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS: Solaris 2.9
Web server: Apache/1.3.31
Perl version: 5.8.7
Client OS: Windows xp
Web Browser: Firefox 1.5
Categories: Permissions

-- SteveRJones - 23 Jan 2006

Answer

ALERT! If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.

I think that should be OK as long as nobody is in the group. It might be sufficient though to lock down just one of the parent directories with a 775, such as the twiki directory.

-- PeterThoeny - 24 Jan 2006

The lockdown would have to occur at some level that would protect an entire directory tree, for example the /data tree. Problems occur if one does not lock down directories under /pub as this is where attachments go and people have a knack for putting attachments where they do not belong.

Which leads me to another question: The permissions are hardcoded in UI:Manage and I suspect in other places (like the FlowChartPlugin when it creates a dir in /pub). It would seem to me that perhaps the mkdir Perl function needs to be (I can't remember the OO term) "wrapped" such that when used within Twiki it will honor a configurable permissions setting. I hate hacking apart code to achieve this kind of an end state.

Thoughts?

-- SteveRJones - 25 Jan 2006

Edit | Attach | Watch | Print version | History: r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r4 - 2006-01-27 - SteveRJones
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.