Web Hosting Forum | Lunarpages
News: October 6, 2008 - Submit Your Site for the October 2008 Site of the Month!
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
October 15, 2008, 04:29:08 PM


Login with username, password and session length


Pages: [1]   Go Down
  Print  
Author Topic: Problems with file permissions  (Read 674 times)
plexcess
Newbie
*
Offline Offline

Posts: 1


« on: October 21, 2007, 05:14:26 PM »

Hello everyone.

I seem to be having a problem with the file permissions on my VPS site. I feel like it's a simple problem but thus far this is really throwing me for a loop.

I had a site that was based on Joomla. I moved it here from a different server and ftped it to a lunar pages shared server plan. Everythuing was fine after the move, no problems at all. A few days ago, me and my partner had to upgrade our account to a VPS plan instead. Again, we ftped and transrrefed the files over to the new host. We installed the database files through shell. The database is fine but the scripts we uploaded ar e reporting errors.

All over the site the Joomla CMS script was logging errors either writing or accessing files on the server, indicating it didn't have proper permission to do so. For example, our Joomla config.php file is supposed to be set to 644 (writable by owner rw-r--r--). At this setting the joomla script cannot write to the file at all, saying it doesn't have permission. It's only when I CHMOD the file so that it is writable by public (646 rw-r--rw-) does the script tell me that the config file is writable. This seems to be a problem caused by our server move, because I have never had to set files writable to the public to be able to be written to like this. I don't want to set all the files the site has problems with to be writeable in this fashion due to security, but I'm not sire where to go with this. There are other scripts on the site besides joomla, and all the scripts are having problems running correctly because of the file permissions. Is there something I need to set in my server that I am missing perhaps in Plesk? Thank you all for any help you can provide.
Logged
perestrelka
Administrator
Master Jedi
*****
Offline Offline

Posts: 1060



« Reply #1 on: October 24, 2007, 11:58:03 PM »

Hi,

Our shared servers use suPHP to run PHP scripts. suPHP executes the scripts as the user specified under virtualhost of your domain configuration in such case. Since your account is the owner of all files you upload, this allows PHP scripts to create or modify your files without any problems with permissions.

However, PHP is configured via mod_php module in Plesk by default. This means that all PHP scripts will be executed as the user used to run Apache which is nobody. So in order to get your scripts working, you need to allow nobody to write into files or folders by granting write permission into the files owned by your username to all others users or changing the folders and files modified in PHP scripts to the ownership of nobody.

I hope this helps. Please advise if you have any additional questions.
Logged

Kind Regards,
Vlad Artamonov
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.6 | SMF © 2006-2008, Simple Machines LLC

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM