This topic is locked

upload problem 775 & 600 file attributes

11/1/2006 7:24:54 PM
PHPRunner General questions
P
penestijeras author

Hi,
We have a project that let us to upload and record correctly a JPG file.
The problem is that the file has been uploaded with 600 file attributes and for this reason we can not see it at the web or List admin view.
I have checked also the attribute of this folder and it seems correct (775). The server is a standard Linux hosting server.
I know that I need to assure that WWW user needs to have access. I think it is correct...
Any ideas?

Thanks in advance

Alexey admin 11/3/2006

Hi,
you can change generated ..._add.php and .._edit.php files to assign custom permission mask to uploaded files.
Find this snippet in both files:

foreach ($files_move as $file)

move_uploaded_file($file[0],$file[1]);



and replace it with:

foreach ($files_move as $file)

{

move_uploaded_file($file[0],$file[1]);

chmod($file[1],0666);

}

P
penestijeras author 11/3/2006

thanks! it works ok <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=12481&image=1&table=forumreplies' class='bbc_emoticon' alt=':)' />
I have a question... it is a problem of my hosting? I don't undersant if I need to modify this every time I need to create a upload script.
Thank you!

Alexey admin 11/6/2006

Hi,
yes, this problem is related to unusual settings at your hosting.
We work on this and will make the next PHPRunner update work fine in your environment too.

P
penestijeras author 11/6/2006

Alexey
Thank you for your response... I think that I have a similar issue related the same problem..

Sometimes the system put 666 to the pictures folder, then the visitor can't see it (even the admin too). Then I must to connect via Ftp and reassign to 775. Is this issue affecting the same problem that you have reported?
Can I make a single .bat or command for send us to my customer that helps him to restore this permissions?
I don't know how can I solve this situation.
thank you very much!

Alexey admin 11/7/2006

Hi,
I recommend you to contact your hosting admin to find out the most suitable way of changing default file and folder permissions.