Giter VIP home page Giter VIP logo

Comments (10)

uuencode avatar uuencode commented on May 28, 2024

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.

uuencode avatar uuencode commented on May 28, 2024

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.

mdolidon avatar mdolidon commented on May 28, 2024

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.

uuencode avatar uuencode commented on May 28, 2024

done.

  1. 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

  2. Compiled endlines, checked version, it's pre-1.6.3

  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.

uuencode avatar uuencode commented on May 28, 2024

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.

uuencode avatar uuencode commented on May 28, 2024

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.

mdolidon avatar mdolidon commented on May 28, 2024

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.

uuencode avatar uuencode commented on May 28, 2024

my home directory I guess, ~/ absolute path: /home/groove

from endlines.

uuencode avatar uuencode commented on May 28, 2024

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.

mdolidon avatar mdolidon commented on May 28, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.