Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cp's "same file check" not working on SSHFS mountpoints #262

Open
mgutt opened this issue Aug 31, 2021 · 1 comment
Open

cp's "same file check" not working on SSHFS mountpoints #262

mgutt opened this issue Aug 31, 2021 · 1 comment
Labels

Comments

@mgutt
Copy link

mgutt commented Aug 31, 2021

Usually it's not possible to overwrite a file by itself:

# echo "test" > ./test.txt
# cp ./test.txt ./test.txt
cp: './test.txt' and './test.txt' are the same file

This is also valid for mounted paths:

# mkdir ./src
# echo "test" > ./src/test.txt
# mkdir ./src_mounted
# mount --bind ./src ./src_mounted
# cp ./src/test.txt ./src_mounted/test.txt
cp: './src/test.txt' and './src_mounted/test.txt' are the same file

But with SSHFS the file is emptied:

# sshfs root@localhost:./src /.src_mounted
# cp ./src/test.txt ./src_mounted/test.txt
# cat ./src/test.txt # no output, file is empty

This is a huge problem for users of Unraid OS (as they don't know that two different paths can contain the same files).

@Nikratio
Copy link
Contributor

Thanks for taking the time to report this issue!

Unfortunately, this project does not currently have any active, regular contributors. As the maintainer, I try to review pull requests and make regular releases, but unfortunately I have no capacity to do significant development beyond that.
Issue reports that do not come with a pull request or clearly have high impact on a large number of users are therefore likely to languish.

I understand that this is frustrating for users, but I hope you can also understand that any development work that I do on this project has to compete with spending time with my family, doing work that I get paid for, doing something recreational without a computer, or working on features/bugs that affect me personally. Most bugs and ideas - unfortunately including this one - loose out in this competition.

In other words, unless you plan to work on this yourself or can recruit someone who will, it's unlikely that anyone is going to do anything about it anytime soon.

This is just to calibrate expectations. I am grateful that you took the time and effort to report this! I'll leave this issue open to document the problem and who knows, maybe someone will pick it up after all :-).

@Nikratio Nikratio added the bug label Aug 31, 2021
@Nikratio Nikratio changed the title Overwriting same files shouldn't be possible cp's "same file check" not working on SSHFS mountpoints Aug 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants