Visit The New, Modern Unix Linux Community

Full Discussion: Perl Uploading Files
Top Forums UNIX for Advanced & Expert Users Perl Uploading Files Post 47862 by sstevens on Friday 20th of February 2004 10:48:37 AM

First, I really appreciate you helping me out with this. I've been on other forums and nobody has tried to help as much as you have.

1) The files that are being uploaded can go to hundreds of different folders. We have multiple sites using the uploading scripts, and within those sites users can choose to upload the files in various places.

2) The users on our sites have no correlation to our unix users. On the sites we're having the most problems with, there's an average of about 50 users, with all usernames defined by the user.

3) I didn't even know about umask until your last post. The only thing I know how to do with it now is type it in and get 0022 in response, which I think means all uploaded files will be given 644 permissions. I did man umask but I couldn't even figure out where to find the umask info. It listed all the bash builtins and I got confused.

We did figure out that we only have this problem at certain times. The only times we know of so far is sometime around 11:00 pm MST and between 5:00 pm - 6:00 pm MST. Between 5:00 and 6:00 it's very rare that the file gets uploaded with the correct permissions. We must have done 30 uploads in that time span and only 3 or 4 were uploaded correctly. We were running top at the same time, but we couldn't find any odd-looking processes running.

Thanks again for your help.
Test Your Knowledge in Computers #294
Difficulty: Easy
Ubuntu is a free and open-source Linux distribution based on Slackware.
True or False?

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

uploading Zipped files get 553 error

I am trying to upload .zip files to Unix server and get the error 553 Permission denied, what is my problem?? I am able to load other files and folders fine. (3 Replies)
Discussion started by: CoastGuard1970
3 Replies

2. UNIX for Advanced & Expert Users

Uploading files in chronological order

Thanks for your help. (3 Replies)
Discussion started by: circuit.muni
3 Replies

3. Shell Programming and Scripting

to block the files uploading via the port

Hi Folks, I am not good in shell scripting. Please help me with my problem. Is it possible to block the file named "ss.cgi" using the port 25 to upload. (4 Replies)
Discussion started by: gsiva
4 Replies

4. UNIX for Dummies Questions & Answers

Uploading files from Mac to Unix/Linux via ssh

Ok. I am using the Terminal window to ssh into a unix server. I am not sure how to copy a file from my mac onto the unix server. What command do I enter and how do I type the file I want to upload Example. Say my file is named Test1.doc and it is on the usr/me/test/working/ directory and I want... (3 Replies)
Discussion started by: libertyforall
3 Replies

5. UNIX for Advanced & Expert Users

Shell Script for uploading files to

Hi Please help me writing a shell script for multiupload. result should look like: $ ./ /tmp/file.avi There seems to be no official API. (3 Replies)
Discussion started by: slashdotweenie
3 Replies

6. Shell Programming and Scripting

Uploading excel sheet to sharepoint portal using perl

Thourgh Perl scripting, Is it possible to upload excel sheet to sharepoint portal ? If the answer is YES.. Could you please share your thoughts and required CPAN modules or any examples to proceed further? Regards, Giridhar S ---------- Post updated at 04:26 AM ---------- Previous update... (0 Replies)
Discussion started by: giridhar276
0 Replies

7. Shell Programming and Scripting

Perl , uploading empty file.

Hi The below script used to work fine. Suddenly it's uploading empty file. I am very new to perl. Please help me to find out the problem. #!/usr/bin/perl #script: use CGI qw/:standard/; print header, start_html('File upload'); print_form(); print_results() if... (2 Replies)
Discussion started by: Anupam_Halder
2 Replies

8. UNIX and Linux Applications

Need help on uploading Video files on Mediawiki and embed to page

I am working on to uploading Video files on Mediawiki and embed to page but not getting success. I tried plugin like MediaPlayer and HTML5Player but these plugins seems having extension limitation as i need to embed files like .wmv, .mpg etc. I am using mediawiki1.17 and CentOS5.8 x64 bit ... (1 Reply)
Discussion started by: sunnysthakur
1 Replies

9. UNIX for Dummies Questions & Answers

Plowshare Command In Uploading Files

OK i am completely new to this stuff!! let me start from the beginning!!! I Am connected to Via SSH!! Then I installed plowshare using their guide perfectly Now They Told Me To refer Plowshare site's Command list for uploading any files to Various... (4 Replies)
Discussion started by: anime12345
4 Replies

10. Web Development

Uploading files via php

I used the following code, which I found on the internet to upload files. <!-- The data encoding type, enctype, MUST be specified as below --> <form enctype="multipart/form-data" action="upload2.php" method="POST"> <!-- MAX_FILE_SIZE must precede the file input field --> <input... (2 Replies)
Discussion started by: jgt
2 Replies

move_uploaded_file - Moves an uploaded file to a new location

bool move_uploaded_file (string $filename, string $destination) DESCRIPTION
This function checks to ensure that the file designated by $filename is a valid upload file (meaning that it was uploaded via PHP's HTTP POST upload mechanism). If the file is valid, it will be moved to the filename given by $destination. This sort of check is especially important if there is any chance that anything done with uploaded files could reveal their contents to the user, or even to other users on the same system. PARAMETERS
o $filename - The filename of the uploaded file. o $destination - The destination of the moved file. RETURN VALUES
Returns TRUE on success. If $filename is not a valid upload file, then no action will occur, and move_uploaded_file(3) will return FALSE. If $filename is a valid upload file, but cannot be moved for some reason, no action will occur, and move_uploaded_file(3) will return FALSE. Additionally, a warning will be issued. EXAMPLES
Example #1 Uploading multiple files <?php $uploads_dir = '/uploads'; foreach ($_FILES["pictures"]["error"] as $key => $error) { if ($error == UPLOAD_ERR_OK) { $tmp_name = $_FILES["pictures"]["tmp_name"][$key]; $name = $_FILES["pictures"]["name"][$key]; move_uploaded_file($tmp_name, "$uploads_dir/$name"); } } ?> NOTES
Note move_uploaded_file(3) is both safe mode and open_basedir aware. However, restrictions are placed only on the $destination path as to allow the moving of uploaded files in which $filename may conflict with such restrictions. move_uploaded_file(3) ensures the safety of this operation by allowing only those files uploaded through PHP to be moved. Warning If the destination file already exists, it will be overwritten. SEE ALSO
is_uploaded_file(3), rename(3), See Handling file uploads for a simple usage example. PHP Documentation Group MOVE_UPLOADED_FILE(3)

Featured Tech Videos

All times are GMT -4. The time now is 04:20 PM.
Unix & Linux Forums Content Copyright 1993-2020. All Rights Reserved.
Privacy Policy