chmod permissions for a file on server

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
pavanpuligandla
Forum Contributor
Posts: 130
Joined: Thu Feb 07, 2008 8:25 am
Location: Hyderabad, India

chmod permissions for a file on server

Post by pavanpuligandla »

hii all,
i' ve developed an admin panel for a small store, in which the admin will upload pictures of prodcuts that were available in the store,
when i tried to upload a picture from the remote server, i'm getting error:

Failed to upload file to the server. Make sure your server allows you to upload files (file_uploads is On, and file access permissions [chmod] are set properly)

i'm not getting any error on my localhost where i'm using Apache server.
can anmyone please help me out, how to set permissions on remote server.
i tried CHMOD permissions from cuteftp, but i'm getting the following message when i tried to change CHMOD permissions for a specific folder or a file:

COMMAND:SITE > CHMOD products_pictures
'500 SITE CHMOD products_pictures Command Not Understood

can anyone please help me, as i need to deploy this on the client side by tomorow..
many thanks in advance,
User avatar
VladSun
DevNet Master
Posts: 4313
Joined: Wed Jun 27, 2007 9:44 am
Location: Sofia, Bulgaria

Re: chmod permissions for a file on server

Post by VladSun »

You need to set folder permissions to 777.
http://support.discusware.com/center/re ... chmod.html
There are 10 types of people in this world, those who understand binary and those who don't
User avatar
pavanpuligandla
Forum Contributor
Posts: 130
Joined: Thu Feb 07, 2008 8:25 am
Location: Hyderabad, India

Re: chmod permissions for a file on server

Post by pavanpuligandla »

hi,
thanks for the comeback,

i've changed that to 777, even though i'm getting the same error.
presently i'm hosting my project on Paralles Plesk Panel under windows OS, IIS Server.
i think we need to change File,Directory Permissions on Parallel's Plesk Panel?
Will it work for me?

actually the php script for image functions is:

Code: Select all

function SetRightsToUploadedFile( $file_name )
{
    @chmod( $file_name, 0777);
}
i even tried by changing 0777 to 2777 which includes all the directories and files of my project,
but getting the same error.

i doubt at IIS server only, can you please help me.
many thanks,
Post Reply