drewbee Posted March 18, 2007 Share Posted March 18, 2007 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? Quote Link to comment https://forums.phpfreaks.com/topic/43249-solved-perl-permissions-and-saving-a-file/ Share on other sites More sharing options...
drewbee Posted March 18, 2007 Author Share Posted March 18, 2007 It always helps to chmod the correct file.... never mind. Quote Link to comment https://forums.phpfreaks.com/topic/43249-solved-perl-permissions-and-saving-a-file/#findComment-210045 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.