Q: How to prevent inode change when working on a remote server hard-linked file via SFTP access ?
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
Research direction
No source file, test, or entry point is named. Start by tracing how Xed edits files opened through Nemo and SFTP, then determine whether the inode change occurs in Xed or in the SSH/SFTP path; done means identifying the responsible component and documenting or resolving the hard-link behavior.
Written by the indexing model from the issue text.
Description
Hi,
I am working on a remote server using scripts "harld-linked" in different locations.
When using SSH + server's local 'nano' editor, everything is okay (meaning hardlinks ensure that the same file content is served everywhere needed).
When I utilised 'Xed' from my client computer via SFTP (through 'Nemo' <<= This adds it to the who's "fault" ? question, right now), I noticed that the inode of the original file on the server is changed despite being a "hard-linked" file.
I wonder if 'Xed' code needs little help to handle this situation better (like if editing a "hrdlinked" file from the system 'Xed' is ran) or if I should have a look at either SSH, SFTP or 'Nemo' configuration to establish a network link to the remote system allowing 'Xed' to work like if on my client PC where 'Xed' resides.
Someone may say that I should better use "soft-links"... (May be, for now... 🤔)
BUT, what about system files "hard-linked" out of the box by software / OS freshly installed and then, after a quick edit, nothing works as expected and ends into many hours of "bug tracking" ?
Well, please let me know if it's possible to address the issue from 'Xed' 's side or not.
Thank you for reading me until there.
Best regards,
HP_
P.S.
Some things I came across during a "quick" search:
-
https://www.google.com/search?q=linux+SFTP+is+it+possible+to+access+the+inode+number+of+remote+files
-
-
#! /bin/bash
file_to_access='/path/to/file/file_name'
file_inode=`ssh ${user}@${server} ls -i ${file_to_access} | cut -d' ' -f1`
# Now, need an equivalent using the already open SFTP connection
# Would it suffice to help ? 🤔
P.P.S.
I also gave a try to read the inode of same "hard-linked" files via a MergerFS mount on the same server, the specially crafted inode value by MergerFS matches for all locations tested.
This means that 'Xed' could (should?) be able to work around the issue I faced if able to get same information provided by:
ssh user@server ls -li /path/to/file/filename
and lokking at field 1 (inode_value) and 3 (links count), right ?
- Dominant language
- C
- Stars
- 551
- Forks
- 115
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from linuxmint/xed
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Allow pkexec xed OpenFEATURE REQUEST
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 4/5 3-5 days Newbie friendliness 38/100
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
Similar issues
-
level/task module/gcp type/bug
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
-
Difficulty 1/5 Under an hour Newbie friendliness 86/100
hapostgres/pg_auto_failover#1190 ·
-
docs
Difficulty 1/5 Under an hour Newbie friendliness 85/100
-
P3 sonic-vpp
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
sonic-net/sonic-buildimage#29662 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 94/100
spack/spack-packages#6586 ·