LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Thread Tools
Old 11-05-2009, 12:23 AM   #1
royhb
LQ Newbie
 
Registered: Nov 2009
Posts: 2
Thanked: 0
permissions headache


[Log in to get rid of this advertisement]
I'm having a bit of a permissions nightmare.

I have a directory called 'data'. It's owned by user1 and it's group is 'user1'. Directory permissions are 775.

Within 'data' is a file called 'thefile'. It's permissions are 664.

On my system apache runs as user www-data.

the group 'user1' has www-data added to it.
user1:x:500:www-data

I have a php script that is owned by user1.
When I run the script from the command line logged in as user1 it works fine and it can write to 'thefile'.

When I try to invoke the script via a web browser it fails with a permission problem writing to 'thefile'. It fails even though the file has a group othat includes www-data (apache).

I know that the answer will make me feel fairly dumb but I'm over banging my head against this.

Suggestions much appreciated.
windows_xp_2003 royhb is offline     Reply With Quote
Old 11-05-2009, 12:59 AM   #2
eth1
Member
 
Registered: May 2008
Posts: 81
Thanked: 8
The scenario you have mentioned should work without problems. Do you have SELINUX enabled ?

Quote:
cat /etc/selinux/config
macos eth1 is offline     Reply With Quote
Old 11-05-2009, 05:40 AM   #3
royhb
LQ Newbie
 
Registered: Nov 2009
Posts: 2
Thanked: 0

Original Poster
Quote:
Originally Posted by eth1 View Post
The scenario you have mentioned should work without problems. Do you have SELINUX enabled ?
No, no SELinux, no apparmor. I'll go back over everything I've set up and see if there's some seemingly minor error.
windows_xp_2003 royhb is offline     Reply With Quote
Old 11-05-2009, 07:22 AM   #4
avijitp
Member
 
Registered: May 2005
Location: India
Distribution: FC11, Debian/Ubuntu, RHEL, Solaris, AIX, HP-UX
Posts: 153
Thanked: 3
Check your php.ini file. There might be some system functions that is now allowing to write to the file.
windows_xp_2003 avijitp is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

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
Minicom headache raypen Slackware 1 06-30-2006 12:42 AM
Solving my Headache Sophic Linux - Wireless Networking 6 03-29-2004 12:27 PM
Help im so new i have a headache jjh221 Linux - Newbie 3 02-11-2004 09:02 PM
CUPS headache Angelo Slackware 2 11-17-2003 11:59 AM
headache... katana Linux - General 2 08-02-2001 08:44 AM


All times are GMT -5. The time now is 06:52 AM.

Main Menu
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
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration