Web Hosting Forum | Lunarpages


*
Welcome, Guest. Please login or register.
Did you miss your activation email?



Login with username, password and session length
May 25, 2012, 09:51:56 AM

Pages: [1]   Go Down
  Print  
Author Topic: Image upload setting wrong file permission  (Read 1719 times)
athena
Trekkie
**
Offline Offline

Posts: 12


« on: December 26, 2008, 05:45:10 PM »

I'm not sure if the solution for this is in PHP or a server setting, but I thought I would start here.

I have an image upload function built into my custom PHP content management system. It works fine in as much as it uploads the image to the right location and all that. What I have discover though is that any image uploaded through the CMS I can't sync back and download via FTP. I get a 'permission denied' error when I try.

I took a look at the file permissions and all the CMS uploaded files are set as 600 belonging to user: 'apache' in group 'apache'. If I use shell access to manually set the files to permission 644 (which shows user: '[my_username]' and group 'psacln'), then I am able to backup the files through FTP.


Is there a way to get the image upload function to set the proper file permissions at the time of the upload?
Logged
perestrelka
Administrator
Master Jedi
*****
Offline Offline

Posts: 1395



« Reply #1 on: December 28, 2008, 01:01:15 AM »

Hello,

You need to use suPHP to make the uploaded files to be owned by the same user that owns the account. Please see the following post about similar issue for more details:

http://www.lunarforums.com/lunarpages_vps_hosting/file_permission-t49808.0.html
Logged

Kind Regards,
Vlad Artamonov
athena
Trekkie
**
Offline Offline

Posts: 12


« Reply #2 on: December 29, 2008, 08:42:28 AM »

Yesterday I paid to have Lunarpages install suPHP, however I am still seeing the same issue when I upload an image through the CMS.

Is there something that needs to be further configured? Is there something I need to be doing in PHP?
Logged
perestrelka
Administrator
Master Jedi
*****
Offline Offline

Posts: 1395



« Reply #3 on: January 01, 2009, 11:52:43 PM »


It is required to check suPHP configration in httpd.conf and files that it includes to ensure suPHP engine is enabled for your site. Please update your ticket with the support about suPHP install asking them to look into this.
Logged

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