Comments (10)
ls -l /mnt
total 4
drwxrwxrwx 18 nobody nogroup 4096 Jul 20 11:34 DATA
ls -l /mnt/DATA
total 72
drwxrwxrwx 2 groove groove 4096 Jul 12 17:33 _100
drwxrwxr-x 2 groove groove 4096 Jul 17 21:32 _200
drwxrwxrwx 7 groove groove 4096 Mar 27 20:35 _300
drwxrwxr-x 2 groove groove 4096 Jul 19 23:26 _400
drwxrwxr-x 2 groove groove 4096 Jul 19 23:35 _500
drwxrwxrwx 5 groove groove 4096 Jul 16 20:19 SOME_ALL
drwxrwxrwx 2 root root 16384 Jul 11 13:23 lost+found
drwxrwxrwx 8 groove groove 4096 Mar 27 20:35 M-PICS
drwxrwxrwx 8 groove groove 4096 Jul 12 09:31 M-THINGS
drwxrwxrwx 5 groove groove 4096 Jul 10 16:40 SITES
drwxrwxr-x 4 groove groove 4096 Jul 12 09:33 TEMP
drwxrwxr-x 2 groove groove 4096 Jul 20 11:36 test
drwxr-xr-x 17 groove groove 4096 Jul 19 15:42 ThunderbirdProfile
drwxrwxrwx 10 groove groove 4096 Jul 13 14:33 xServer
drwxrwxrwx 14 groove groove 4096 Jul 10 16:40 yServer
ls -l /mnt/DATA/test
total 4
-rw-rw-r-- 1 groove groove 13 Jul 20 11:39 aaa.txt
from endlines.
I have just put that file in a folder in my own home folder and it worked as expected:
endlines linux -r ~/test
the file was ok and converted.
DATA is an additional ext4 disk called DATA mounted in /mnt owned by nobody and nogroup.
http://i63.tinypic.com/20gzccm.jpg
EDIT: I changed the owner and group of DATA, tried again with no success, the file in the folder /mnt/DATA/test was deleted when trying to convert.
from endlines.
Hello @uuencode
I'm not too available this week. I haven't reproduced your issue yet. However I've added a temporary measure that, while not fixing the root cause, should at least prevent any data loss at that stage.
I had made the assumption that if a file could be deleted, I could as well create a new one with the same name, and thus I didn't check any errors from the rename
function that changed the temporary file back into the original file. I've set a fail safe check in the place I suspect, and I'd like to hear if it changes anything in your particular scenario.
Is there any way I could ask you to pull the master branch, compile, check that you run version "pre-1.6.3" and then replay the scenario that was previously resulting in data loss ?
Besides, do you know what file system the mounted drive is running ?
Thank you !
from endlines.
done.
-
The mounted drive is a separate primary partition on the same disk, file system ext4
It is an SLC SSD disk but I guess it doesn't matter.
screenshot: http://share.pho.to/AEQVS/b0/original -
Compiled endlines, checked version, it's pre-1.6.3
-
Files are not converted but still there untouched
endlines linux -r /mnt/DATA/test
endlines : converting files to Unix (LF)
endlines : can not create .tmp_endlines
endlines : can not create .tmp_endlines
endlines : 0 file converted
2 errors
Thank you for your time and your efforts.
from endlines.
btw I had been using the same command: endlines -r /mnt/DATA/folder on a mounted drive a hundred times without a single problem with Ubuntu 14.04, however, the mounted drive was then NTFS.
from endlines.
with sudo, 2 files, aaa.txt and bbb.php
aaa.txt untouched, bbb.php deleted, .tmp_endlines exists converted to LF in the root dir
sudo endlines linux -r /mnt/DATA/test
endlines : converting files to Unix (LF)
endlines : can not restore /mnt/DATA/test/bbb.php
-- Fail safe reaction : aborting.
-- You will find your data in .tmp_endlines
-- Please rename it manually to /mnt/DATA/test/bbb.php
-- You may report this occurence at :
https://github.com/mdolidon/endlines/issues/12
4 files, aaa.txt, bbb.txt, ccc.php and ddd.inc, all 4 files untouched
endlines linux -r /mnt/DATA/test
endlines : converting files to Unix (LF)
endlines : can not create .tmp_endlines
endlines : can not create .tmp_endlines
endlines : can not create .tmp_endlines
endlines : can not create .tmp_endlines
endlines : 0 file converted
4 errors
with sudo, 4 files, aaa.txt, bbb.txt, ccc.php and ddd.inc, ddd.inc deleted, the others untouched
sudo endlines linux -r /mnt/DATA/test
endlines : converting files to Unix (LF)
endlines : can not restore /mnt/DATA/test/ddd.inc
-- Fail safe reaction : aborting.
-- You will find your data in .tmp_endlines
-- Please rename it manually to /mnt/DATA/test/ddd.inc
-- You may report this occurence at :
https://github.com/mdolidon/endlines/issues/12
from endlines.
Thanks, a valuable input. I think I'll change .tmp_endlines' creation process. As a matter of curiosity, what's the current working directory ?
from endlines.
my home directory I guess, ~/ absolute path: /home/groove
from endlines.
Hello again,
I wonder if the issue is permissions related, got the same problem with a USB pen drive, (automatically mounted /media/USER/xxx-1234), file system FAT.
Thank you for your efforts.
from endlines.
Hello again. Sorry, it took some time before I sat down and open an editor to fix this issue. But here it is. Version 1.6.4 has what should be the proper correction. The issue arose when your CWD was on one physical drive (e.g. main HD), and the files you were trying to convert were on another (e.g. USB drive).
Best regards, and big thanks for your report !
from endlines.
Related Issues (20)
- Compiling on AIX or cross multi platform support HOT 16
- cannot make install / ubuntu 16.04 HOT 4
- (OSX) CLOCK_REALTIME undeclared HOT 4
- Installing with yum / apt HOT 3
- Output to STDOUT instead of STDERR HOT 4
- Mac binary 1.9.2 HOT 4
- May not add final new-line HOT 1
- Project outline HOT 5
- 0.3.2 File opening errcodes aren't checked
- New Feature : --exclude HOT 1
- Feature request: less-verbose
- Bug in handling certain filenames
- 0.3.2 reduce stack volume to accomodate weak OSes HOT 1
- (0.4.1) Freeze when found zero bytes file HOT 2
- Doesn't compile on Ubuntu 14.04 HOT 3
- (1.0) it made a .sh file non-executable HOT 2
- (1.1) (walkers library) - treats hidden dirs as files if "process hidden" option is on HOT 1
- Clarify Windows support HOT 2
- brew this! HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from endlines.