Jump to content

Recommended Posts

Hello Everyone,

I have a upload progress indicator that is a combination of AJAX, Perl, and PHP. Since PHP cannot read how much of a file has been currently uploaded, yet PERL can, it is where I had to look at.

 

When I upload the file, PERL saves the POST data in a temporary file, to which passes the filename to a PHP script and the PHP script moves the temporary file to a permanent file where I want it to be.

 

This works fine, except for one problem. It turns out that when PERL saves a file that doesn't exist, it sets the permissions to 0600. This basically means that only the PERL module can read and write to the file.

 

For some reason as well, I cannot set the permissions on the temporary file.

 

I tried

 

#... Snip file saving code
chmod 0755, 'temp_file.html';

 

But still when php moves the file it still has the same 0600 permissions.

 

Does anyone have any tips for saving files and permissions that exist with perl itself, or how to get them to carry over?

 

The funny thing is is that PHP can move the file, it just cannot read/write/execute it. Weird huh?

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.