LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 08-24-2012, 07:34 PM   #1
JFrankParnell
LQ Newbie
 
Registered: Aug 2012
Posts: 1

Rep: Reputation: Disabled
Suexec vs. serving files from symlinked dir, user doesnt have perms to serve from


Howdy all,
Scenario: Managed VPS, whm,cpanel, etc. I am essentially the only dev working in this server, all the sites are our website clients, we dont sell hosting to anyone or anything like that. Just us serving our clients mostly small-medium websites. Almost all wordpress.

What I want to do is have a central dir with a wordpress theme (in future i might want to have all of wp symlinked, but for now, just a theme). I want to have many sites using this same theme and I want to update one place and have all the sites updated.

I have already made the symlinks as appropriate. I have also visited the tweakphpdir in cpanel or whm and enabled the open_basedir for the sites and that works, I am able to include() from it.

What doesnt work is trying to serve files (css, etc) from that symlinked dir. I am told that this is cuz the 'user' of the site doesnt own the symlinked dir and that suexec is the reason.

So, the question...Given that there will be no nefarious ftp users or sites not under my control, is it dangerous to open things up to allow serving from this symlinked dir? What would be the suggestion security wise to achieve the goal set out in my second paragraph? What about group permissions/ownership?

thanks,
j
 
Old 08-25-2012, 08:54 AM   #2
heinblöd
Member
 
Registered: May 2004
Location: France
Distribution: Slackware Gentoo
Posts: 186

Rep: Reputation: 31
Hi,
I suppose you connect to the vps as root per ssh.

In this case *I* would say you could change the permissions, as I think you need to chmod the files (symlinked and those in httpdocs) to the apache user.

You could get rid of not used ftp users in this case and be safer as before, as the apache user normally has no ftp access and no shell acces .

But I thougth about sth else :

Did you allow apache to follow symlinks?
Option:
Quote:
FollowSymLinks
You'd need sth like this
Code:
<Directory "/to/www/dir/with/symlinks">

    Options Indexes FollowSymLinks

    etc...

</Directory>

Last edited by heinblöd; 08-25-2012 at 08:55 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
mpm_itk , suexec or openbase dir tolstoyinlove Linux - Server 0 03-27-2011 01:20 AM
Apache Virtual Host doesnt serve files from correct directories ajb1967 Linux - Server 3 08-05-2010 04:55 AM
httpd-2.2.3 | error - suEXEC mechanism enabled (wrapper: /usr/sbin/suexec) jmahto Linux - Enterprise 3 07-14-2010 01:53 AM
Forcing User Permissions on a Directory (and all subdirectories and files in the dir) hevfuture Linux - Newbie 3 03-26-2008 12:39 PM
Command to display /dir, /dir/sub, /dir/sub/files knockout_artist Linux - Newbie 9 10-25-2007 02:57 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 07:01 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration