Lunarpages Web Hosting Forum

Author Topic: Can't Change Permissions for CMS Uploads  (Read 2353 times)

Offline paul_c

  • Intergalactic Cowboy
  • *****
  • Posts: 60
Can't Change Permissions for CMS Uploads
« on: October 22, 2005, 12:33:20 PM »
Just moved to a dedicated server and I'm having problems with permissions for the CMS (Mambo).  Any time I upload a module/component through the CMS upload system I am unable to change permission or overwrite the files via FTP.  I can FTP files directly and can also change permissions on directories and files that LP moved over from the basic web hosting plan I previously had.  But for some reason changing permissions for any new uploads that occur through the CMS can't be done.  I did not have this problem when I was on the basic web hosting plan.

Offline nervien

  • Newbie
  • *
  • Posts: 1
Re: Can't Change Permissions for CMS Uploads
« Reply #1 on: October 22, 2005, 01:08:09 PM »
i have the same problem
i install manually nucleus
i can't change the permissions for the config.php
 :(

Offline paul_c

  • Intergalactic Cowboy
  • *****
  • Posts: 60
Re: Can't Change Permissions for CMS Uploads
« Reply #2 on: October 23, 2005, 06:56:05 AM »
Anybody from LP able to help us on this?

Offline paul_c

  • Intergalactic Cowboy
  • *****
  • Posts: 60
Re: Can't Change Permissions for CMS Uploads
« Reply #3 on: October 25, 2005, 05:36:26 AM »
Still need some help on this please.

Offline Jordan

  • Super Nerd Monkey
  • Spacescooter Operator
  • *****
  • Posts: 41
Re: Can't Change Permissions for CMS Uploads
« Reply #4 on: October 25, 2005, 10:11:18 AM »
Hello,

Our shared servers use a system called suPHP to serve PHP pages, and our dedicated machines are setup by default to use mod_php in Apache. When using mod_php, files written by the webserver gain the ownership of the webserver and this is why you are unable to make modifications on these files. To allow your user to regain ownership of the files you should login to your server using shell and then change the owner using the chown command. For example, say I were to upload the file IMG0001.jpg using a PHP upload form. This would gain the ownership of the webserver or nobody:nobody. If the full path to the file was /home/lpjordan/public_html/IMG0001.jpg - I would execute the following command as root to change the owner back to lpjordan:

Code: [Select]
chown lpjordan:lpjordan /home/lpjordan/public_html/IMG0001.jpg
You can also do this on a whole directory so say I want to change the ownership of all the files under /home/lpjordan/public_html/images:

Code: [Select]
chown -Rf lpjordan:lpjordan /home/lpjordan/public_html/images
Please be careful with this command as changing the ownership on files not under your /home/username/public_html directories is potentially very dangerous and could render your server unusable. You should never change the ownership of a file outside of the public_html directories unless you know what you are doing. It is generally safe to change the ownership of files within public_html though.
Jordan Bouvier
JSA - System Admin Team

Offline paul_c

  • Intergalactic Cowboy
  • *****
  • Posts: 60
Re: Can't Change Permissions for CMS Uploads
« Reply #5 on: October 25, 2005, 04:04:39 PM »
Thanks for your highly detailed answer.  I'll give it a try tomorrow and let you know how it went.