Apache server not able to download file having copy as file name - apache

In a web application user has provision to upload a files to the server which can be downloaded and viewed in future. We have to maintain the file name same as that it was uploaded for future downloads.
When a user uploads a file name having copy as a file name like Copy_template.xls the Apache server throws 403 error, but if we rename the file by removing copy they are able to download. How to fix this?

Related

Giving access to file from Tomcat to external user

I have Tomcat setup with servlets. When the user request a file to download, then I send him the path to the file to download.
1-Currently the path is in C drive. Do you think I should move it to be somehwere under Tomcat?
2-How can I give the user access to the folder/file so he can download it?
3-Finally, if there are multiple files inside the folder. How can I ensure he can only see this file (i.e. if he manually changes the file name in the URL, he won't get the file with that modifed file name)
Thank you
One possibility:
Yes move them over to tomcat say under /myapp/resources/file_library
when the users requests for a particular file , build a temp user directory and
copy the file in there and send the link to him , as in
/myapp/user_xyz/requestedfile#1
Always maintain the temp location with only one file, i.e. when the user requests another
file, clear the temp user-specific area and put the next file in .
/myapp/user_xyz/requestedfile#2

Moved my opencart site to a new server but now getting warning on session open and not able to login to admin also

I have moved my opencart site to a new server (all files & db). Updated the config files with correct file paths and database details.
The site loads but on top of the site im getting a warning message that goes like
Warning: session_start(): open(/home/users/web/b1869/moo.cineidentitycom/cgi->bin/tmp/sess_15934afd5f2bdfdc7a8f64e3901459bf, O_RDWR) failed: No such file or directory
The problem is this is trying to open a file from my old server. The path mention in this open command does not exist in my new server.
I tried to clear system cache (delele all files under system/cache) and did the same for vqmod. But still getting this warning.
How do i clear this session, which is still pointing to the old server file path.
Using the current opencart version (1.5.6.4)
Thanks

Uploading via SFTP over slow connection to temporary location then moving to real location

I have an issue where occasionally I need to work at Starbucks.
When I upload a PHP file the connection is slow so if a user tries to access the PHP file while I am uploading it they will of course be issues a fatal error.
This is very inconvenient to my busy websites. Is there a way that when a file is uploaded it can be uploaded to a temporary location, and then the server moves it to the real location once finished?
You can make WinSCP upload the file to temporary file and rename it once transfer completes automatically.
In Preferences go to the Transfer > Endurance tab and select All Files in the Enable ... Transfer to temporary file name box.
For details refer to:
https://winscp.net/eng/docs/ui_pref_resume
Why don't you just upload the file to a temporary folder on the server and execute commands on the server to remove the old file and move the new file? It should move the file fast enough on the server to eliminate any hiccups the users would see unless their timing was just right.

Cannot access the pdf file?

I have a file in PDF format. But when I open it, I get this error message:
windows cannot access the specified device, path, or file. You may not have the appropriate permissions to access the item.
What could be causing that?
This problem can occur if any of the following scenarios exist on your PC.
You do not have permissions to the file or the file location
The file is in a location that is not currently accessible as a local network
or an external drive that is not connected to PC The file has been
moved or deleted The file is corrupt or the shortcut The file may be
blocked by Windows Antivirus software may be blocking the file

How to download files from a web folder in vb.net

I have a web folder e.g. "http://www.myhost.com/software/" if I open this address in IE it show me all files which this folder have.
I want to download all files but I don't want to hard-code name of files. I know I can get the files with webclient.DownloadFiles(#address,#filename). Is this possible to download all files or at least get the name of files from the web folder?
As a minimum you can download the same file IE displays (note that this file is provided by your web server -- there is not a standard) and parse the HTML for the files yourself, e.g. using webclient.DownloadFile("http://www.myhost.com/software/", #listfilename).
To access the files more "professionally", you'll need to see if the server also allows access via FTP or WebDAV because HTTP does not have a file "interface".