LinuxQuestions.org
Visit Jeremy's Blog.
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 02-03-2007, 07:44 AM   #1
ForYouAndI.com
Member
 
Registered: Jan 2006
Distribution: Debian
Posts: 82

Rep: Reputation: 15
Access to public_html directory


I set up my Suse 10.2 box as a linux web server. I created a special group called webGroup and added wwwrun(php script) and andrew(me) to it so that the script and I, andrew, can have full access to the public html directory.

I set everything from public_html on down so that owner and group can write. andrew cannot write to anything! When I do the same anywhere else on the filesystem, andrew can write. And no, I don't have any sticky bits set.

What is going on?
 
Old 02-03-2007, 11:05 AM   #2
w3bd3vil
Senior Member
 
Registered: Jun 2006
Location: Hyderabad, India
Distribution: Fedora
Posts: 1,191

Rep: Reputation: 49
could you show us the ls -l on public_html dir?
 
Old 02-03-2007, 11:42 AM   #3
ForYouAndI.com
Member
 
Registered: Jan 2006
Distribution: Debian
Posts: 82

Original Poster
Rep: Reputation: 15
drwxrwsr-x 13 wwwrun webGroup 1192 2007-02-03 08:55 public_html

-rw-rw-r-- 1 wwwrun webGroup 138 2006-02-13 06:23 arrowDown.gif
-rw-rw-r-- 1 wwwrun webGroup 2404 2007-02-02 16:34 begin.php
drwxrwxr-x 3 wwwrun webGroup 360 2006-11-06 21:06 Biblical
drwxrwxr-x 2 wwwrun webGroup 80 2006-11-06 21:06 ContactData
-rw-rw-r-- 1 wwwrun webGroup 1922 2006-02-13 06:23 contact.php
-rw-rw-r-- 1 wwwrun webGroup 8411 2006-02-13 06:23 Copy of userCP.php
drwxr-xr-x 2 wwwrun webGroup 72 2007-02-02 23:20 Counters
-rw-rw-r-- 1 wwwrun webGroup 4699 2006-12-23 19:40 DirBrowser.php
drwxrwxr-x 2 wwwrun webGroup 80 2006-11-06 21:06 Documents
-rw-rw-r-- 1 wwwrun webGroup 579 2007-01-04 23:23 end.php
drwxrwxr-x 8 wwwrun webGroup 360 2006-11-06 21:06 Entertainment
-rw-rw-r-- 1 wwwrun webGroup 12803 2007-01-31 22:09 Functions.php
-rw-rw-r-- 1 wwwrun webGroup 109 2006-02-13 06:23 GetFileSize.php
-rw-rw-r-- 1 wwwrun webGroup 7009 2006-02-13 06:23 hFill.jpg
-rw-rw-r-- 1 wwwrun webGroup 349 2006-02-13 06:23 hFill.png
-rw-rw-r-- 1 wwwrun webGroup 349 2006-02-13 06:23 hFill_right.png
-rw-rw-r-- 1 wwwrun webGroup 22 2006-02-13 06:23 Ideas.txt
drwxrwxr-x 12 wwwrun webGroup 400 2006-11-06 21:06 Images
-rw-rw-r-- 1 wwwrun webGroup 841 2007-02-02 16:34 index.php
drwxrwxr-x 2 wwwrun webGroup 96 2006-11-06 21:06 Info
-rw-rw-r-- 1 wwwrun webGroup 3798141 2006-02-13 06:23 InsideEm01.img
-rw-rw-r-- 1 wwwrun webGroup 1494 2006-02-13 06:23 login.php
-rw-rw-r-- 1 wwwrun webGroup 25809 2006-02-13 06:23 Logo.img
-rw-rw-r-- 1 wwwrun webGroup 535 2006-02-13 06:23 logout.php
-rw-rw-r-- 1 wwwrun webGroup 23378 2006-02-13 06:23 M51 center flipped_Featur e.jpg
-rw-rw-r-- 1 wwwrun webGroup 1689 2006-02-13 06:23 member.php
drwxr-xr-x 4 wwwrun webGroup 104 2007-02-02 23:25 Members
drwxrwxr-x 3 wwwrun webGroup 104 2007-02-03 08:55 Programming
drwxrwxr-x 6 wwwrun webGroup 424 2006-12-22 19:55 Programs
-rw-rw-r-- 1 wwwrun webGroup 16192 2006-02-13 06:23 Quickey.wav
-rw-rw-r-- 1 wwwrun webGroup 3920 2006-03-01 01:43 register.php
drwxrwxr-x 2 wwwrun webGroup 160 2006-11-06 21:06 Restricted
-rw-rw-r-- 1 wwwrun webGroup 453 2007-01-07 21:02 style1.css
-rw-rw-r-- 1 wwwrun webGroup 1045 2006-02-13 06:23 Terms.php
-rw-rw-r-- 1 wwwrun webGroup 667 2006-02-13 06:23 uploadSug.php
-rw-rw-r-- 1 wwwrun webGroup 3719 2006-12-23 18:13 userCP.php
 
Old 02-03-2007, 07:38 PM   #4
w3bd3vil
Senior Member
 
Registered: Jun 2006
Location: Hyderabad, India
Distribution: Fedora
Posts: 1,191

Rep: Reputation: 49
the permissions seem to be right. check /etc/groups to confirm andrew is a member of webGroup
 
Old 02-03-2007, 08:21 PM   #5
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
Be aware that just editing /etc/group won't cause the change to be picked up in currently running login sessions. The andrew user will need to log out and log back in (or do newgrp webGroup) to get the new permissions.
 
Old 02-03-2007, 08:54 PM   #6
ForYouAndI.com
Member
 
Registered: Jan 2006
Distribution: Debian
Posts: 82

Original Poster
Rep: Reputation: 15
Looks like Yast did it right:
video:x:33:andrew,emily
wheel:x:10:
www:x:8:
xok:x:41:
users:x:100:
webGroup:x:1000:andrew,wwwrun

I even tried restarting apache after I made the group change from Yast. Do you think I should try logging out?

This seems like a really weird problem.
 
Old 02-03-2007, 11:41 PM   #7
w3bd3vil
Senior Member
 
Registered: Jun 2006
Location: Hyderabad, India
Distribution: Fedora
Posts: 1,191

Rep: Reputation: 49
you could rather just type "id" and it should show you your privileges.
 
Old 02-04-2007, 08:48 AM   #8
ForYouAndI.com
Member
 
Registered: Jan 2006
Distribution: Debian
Posts: 82

Original Poster
Rep: Reputation: 15
id revealed I was not yet part of webGroup so I logged off and on. Problem fixed.
 
  


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
apache public_html access denied willigiann Linux - Networking 2 12-12-2006 11:36 AM
How to enable directory browsing inside public_html? gepesz Linux - Networking 1 07-23-2004 04:11 PM
apache unable to access /home/*/public_html directory cavemanf16 Linux - Software 6 07-08-2004 05:43 AM
can i set ~/public_html/perl as a perl directory for apache? doublefailure Linux - Networking 1 07-09-2002 04:31 PM
FTP access to public_html IHawk Linux - Networking 2 02-21-2002 08:00 PM

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

All times are GMT -5. The time now is 06:26 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