LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Provide write access for web accout users and forum/CMS packages (https://www.linuxquestions.org/questions/linux-server-73/provide-write-access-for-web-accout-users-and-forum-cms-packages-707116/)

dizzi 02-24-2009 07:42 AM

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

rweaver 02-24-2009 01:43 PM

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.

dizzi 02-24-2009 04:53 PM

Great stuff rweaver, thanks for the information.


All times are GMT -5. The time now is 04:44 PM.