WinSCP gives a '/tmp' directory error while saving a changed file

Advertisement

BathindaHelper
Joined:
Posts:
8

WinSCP gives a '/tmp' directory error while saving a changed file

Even when I'm logged in as a root user to my remote Ubuntu22.04 server thru WinSCP 6.1.2, I get this error when I save a changed file (even though I found that the changes made by me are saved in that file, but these errors irritate).
See the screen shot here: https://i.stack.imgur.com/egbR0.png
The contents of the error (also showing partially in the attached screen shot) are:
General failure (server should provide error description).
Error code: 4
Error message from server: Failure

Common reasons for the Error code 4 are:
- Renaming a file to a name of already existing file.
- Creating a directory that already exists.
- Moving a remote file to a different filesystem (HDD).
- Uploading a file to a full filesystem (HDD).
- Exceeding a user disk quota.
I've not been able to find the option of 'Moving files to Recycle Bin' in WinSCP settings.

1.png

Reply with quote

Advertisement

BathindaHelper
Joined:
Posts:
8

How can we make use of Recycle bin option in WinScp, when WinScp is installed on Windows on local pc

I've WinSCP installed in Windows 11.
When I login to remote Ubuntu server, and turn on the option to use the 'Temp' folder as the 'Recycle Bin', and delete a file, it starts giving "Error 4: Server Failure" or something like that.
As far as I read, it is due to diff file systems in my local PC and remote Ubuntu.
Is there any solution to this problem, if I wanted to use Recycle bin on remote Ubuntu server?

Reply with quote

martin
Site Admin
martin avatar

Re: How can we make use of Recycle bin option in WinScp, when WinScp is installed on Windows on local pc

@BathindaHelper: No, it's probably because the remote file you are deleting is on a different file system than the /tmp. You have to configure the recycle bin to be on the same file system as the remote files you are working with.

Reply with quote

Advertisement

BathindaHelper
Joined:
Posts:
8

I created the /tmp folder in my remote linux server (actually it was already there) and in the site preferences I gave the path to recycle bin as /tmp.
But still I get the same error as mentioned in earlier/OP.

See attached screenshot.

1.png

Reply with quote

martin
Site Admin
martin avatar

So you didn't actually change anything, right?
As I wrote above, the /tmp is probably on a different remote file system than the files you are deleting. You have to create the recycle bin folder on the same remote file system.

Reply with quote

Advertisement

martin
Site Admin
martin avatar

Re: But /tmp is on remote server only. I've attached the screen shot also

I know. But the remote system most likely has multiple file systems (for example multiple disks). And the /tmp is likely on a different one that the files that you work with. In general, you cannot move files between two different file systems (disks).

Reply with quote

BathindaHelper

You mean to say that we cannot create any one folder on our remote server, which could be used as recycle bin?
Or do you mean to say that we cannot create any folder on our remote server, which we would be sure that it has same file system as our remote server boot disk? Can't we create a folder on remote server's boot disk itself?

Reply with quote

martin
Site Admin
martin avatar

Sorry, I do not understand your questions.
I mean that the recycle bin directory have to be on the same file system (disk) as the files you want to move to the recycle bin.

Reply with quote

Advertisement

BathindaHelper
Joined:
Posts:
8

For whole of our conversation, I've understood this, if you could pls confirm it:

That I cannot create any folder on my remote Ubuntu server (e.g. /temp) which could be used as 'Recycle Bin'.
But what I've not understood is that when I create any folder on my remote ubuntu server, (e.g. 'anyname' folder in the root directory), can't I use that folder as my 'Recycle Bin'? Do you mean I can move files manually to that '/Temp' folder, but can't use it as 'Recycle'.

Reply with quote

Guest

If you don't mind me interjecting. To look at it backwards, if it doesn't work, then the path location of the recycle bin is not a correct location for use. According to Martin, you can't use just any location.

Try a different location. /tmp is an example path. Try something else like in the path of the file you're trying to recycle.

I don't know why it has the restrictions it has but there's possibly good reasons for it.

Reply with quote

Guest

@Guest: Thanks for your insights.

But your suggestion to create a bin in the same path as I'm deleting the file in, isn't very practical.

It'd demand diff bins for files being deleted from diff directory paths.

2nd, what does/might have restrictions acc to you? (emphasis on 'what' or 'what path')

Reply with quote

Advertisement

You can post new topics in this forum