LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 02-24-2009, 07:42 AM   #1
dizzi
Member
 
Registered: Jun 2004
Location: Yorkshire, UK
Distribution: Slackware, Mepis LiveCD
Posts: 146

Rep: Reputation: 15
Provide write access for web accout users and forum/CMS packages


Hi

I have noticed that some hosting provides have been able to set folders to 755 and files 644 but still permit both the Web interface user and the CMS/Forum etc scripts to have write access to the web root of the account. I will provide and example to clarify this more. As the web interface user, I can write to the root of my web account as expected via the cpanel File manager or FTP. On the other hand scripts such as Joomla! and phpBB also have write permissions with the 755/644 settings. So when they are installed or extended, they don't complain about folders being unwriteble which can occur on other servers with the 755/644 directory/file settings.

Does anyone know how this is done or what tool is used to accomplish this on an Linux Apache/PHP server?

Using: Apache 2.2.11, MySQL 5.0.67 and PHP 5.2.8 on Slack 12.2.

Regards
 
Old 02-24-2009, 01:43 PM   #2
rweaver
Senior Member
 
Registered: Dec 2008
Location: Louisville, OH
Distribution: Debian, CentOS, Slackware, RHEL, Gentoo
Posts: 1,833

Rep: Reputation: 163Reputation: 163
suPHP/suexec type programs typically which let the script processes run as the user instead of the webserver user (nobody, apache, httpd, etc).

If you want to know for sure make a file called index.php and put this in it
Code:
 <?php passthru("whoami"); ?>
If it shows your accounts user name, they're likely using suphp/suexec/fastcgi to execute the scripts and cgi's as the user... likely the perms 700/600 would work as well as any. If it shows nobody/apache/etc then they're not and you need less restrictive perms on the files for them to work 775/777 even.

Last edited by rweaver; 02-24-2009 at 01:50 PM.
 
Old 02-24-2009, 04:53 PM   #3
dizzi
Member
 
Registered: Jun 2004
Location: Yorkshire, UK
Distribution: Slackware, Mepis LiveCD
Posts: 146

Original Poster
Rep: Reputation: 15
Great stuff rweaver, thanks for the information.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Granting full write access to another users web directory acctman Linux - Server 2 02-12-2009 05:32 PM
no write access for users, only root. linuxpokernut Slackware 15 11-24-2008 09:01 PM
enabling read write access for non root users austinium Linux - Newbie 7 05-01-2008 07:05 AM
Allow two users write access, but not delete jimieee Linux - General 4 03-29-2005 08:37 AM
web site to read/write access db info... Scrag Programming 7 07-02-2004 10:36 AM


All times are GMT -5. The time now is 08:41 PM.

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
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration