Cannot access the pdf file? - pdf

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

Related

Store Neomutt Mails in External Disk

I have installed Neomutt on Arch Linux using Luke Smith's Mutt-Wizard. It's working fine. I am storing all my emails in my local laptop's ~/.config/mutt/accounts folder which is mentioned in my .muttrc file.
But I have thousands of emails. So I wanted to change the location of storing the mails. I intend to store them on an external hard disk. But when I write the location of external disk in my .muttrc, Neomutt gives me error:
Maildir error: cannot read UIDVALIDITY.
Error: channel joy_deep#gmx.com: near side box INBOX cannot be opened.
Is there any way to config this?
I got it figured out somehow. I copied the mw file to mymw file. I changed the bash script. In maildir location, I put my Nextcloud folder. Changed same for .mbsyncrc file. Now it works.
Thanks.

Web server has no permission to access files on network drive

I want to use DDEV as a local development environment. The setup was successful and the website (a WordPress) is running.
Currenty our team is using XAMPP and to avoid downloading large files on every local machine we create symbolic links (e.g. the "uploads" folder in WordPress). The target is a network drive. So everyone in our team has access to the same files.
Now I want to do the same with DDEV. In WSL I mounted the network drive and created a symbolic link. Inside the console I have full access to the mounted directory, I can create, edit and remove files.
But when I access a file with the browser I get the following error message:
403 Forbidden. You don't have permission to access this resource.
The same error occurs when I try to upload a new file within WordPress.
Is there any way to give the webserver the permission to view and modify the files on a network drive?
The Webserver is an Apache/2.4.38.
As #rfay mentioned I had to add the network drive as volume so it's accessible by the web container. Therefore I created a new docker-compose-file within the .ddev directory (see also in the docs: https://ddev.readthedocs.io/en/stable/users/extend/custom-compose-files/#docker-compose42yaml-examples).
Additionally the permissions on the network drive were incorrect.

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

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?

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.

How to stop deleting file during download on Mac

I've a client-server application on Mac. Client uploads a file and server downloads the file.
Sever reads a specific size of bytes from the client and write into the file. But in the middle user can delete the file using Finder context menu or from terminal. I want to stop any write/execution operation on this file from any other application till the download runs. It can be easily done using FILE_SHARE_READ while creating the file on Windows. But how we can achieve the same functionality on Mac?
I've tried advisory locks on Mac but no luck. If process A uses advisory locks on the file then process B can't access it but i can always delete the file using Finder context menu.
Are you sure you need to do this? So long as you've got an open file handle, it doesn't matter if the file is deleted, you can still read from it until you close the file handle. If the user deletes the file mid-transmission, it won't stop you from sending the full file.