The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Protecting directory trees with gpgdir iBot UNIX and Linux RSS News 0 04-24-2008 12:50 PM
directory tree ravi raj kumar Shell Programming and Scripting 3 01-24-2008 01:08 PM
directory as tree anything2 High Level Programming 2 03-01-2007 09:38 AM
password protecting a directory iriemember UNIX for Dummies Questions & Answers 2 08-06-2002 04:57 PM
Directory tree search??? solvman High Level Programming 3 09-28-2001 02:27 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 02-16-2008
rooneyl rooneyl is offline
Registered User
  
 

Join Date: Feb 2008
Posts: 4
Protecting the directory tree

Hello, I am hoping someone maybe able to help me.
I have set up an Apache web server on my sun server with user accounts in the main htdocs directory. My question is how to stop these users searching up the directory tree when they ftp/telnet to the server. Also is it possible to restrict the commands they have access to? For example only let them have ls, cd, mkdir, rm.
I am using a sun sparc with solaris 8 installed, Apache 2.2.6.
Thank you for any help given.
  #2 (permalink)  
Old 02-17-2008
Smiling Dragon's Avatar
Smiling Dragon Smiling Dragon is offline Forum Advisor  
Disorganised User
  
 

Join Date: Nov 2007
Location: New Zealand
Posts: 922
If you give user's read/write access to subdirs of htdocs, you had better trust them. Otherwise you are allowing them to run arbitrary code as the apache user (this might be ok of course if you have set up apache so that the user running it has the minimum access).
Generally speaking, it's a better idea to allocate a seperate area for user's home dirs.

If you really have to do it this way though, you only need to grant execute access to the parent directories of htdocs. Leave off the read-access bit and they will only be able to change into the dirs, not read the contents.
eg
/ root root drwxr-xr-x
/export root root drwx--x--x
/export/htdocs root root drwx--x--x
/export/htdocs/user1 user1 httpusers drwxr-xr-x
/export/htdocs/user2 user2 httpusers drwxr-xr-x
  #3 (permalink)  
Old 02-17-2008
reborg's Avatar
reborg reborg is offline Forum Staff  
Administrator
  
 

Join Date: Mar 2005
Location: Ireland
Posts: 4,245
Do you really need to allow them telnet ( or more generally shell ) access. If not, then disbale shell access for the users, switch to wu-ftp or vsftp, turn on the home directory jail function of the ftp daemon and that should be it.

There are other concerns that you should consider as the previous post indicated. I would never consider giving users access to a folder under the web root, apache has other functionality which you can use to achieve the same thing.
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 11:16 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0