News for hackers. Stuff that matters.
Re:My one-liner Linux Dropbox client by lloeki on Tuesday December 25, 2018 @06:29AM (#18757023)
> Recently, the proprietary Dropbox Linux client dropped support for all Linux file systems except unencrypted ext4.

What the heck. Anyone has more information about that? Any announcement? And why would it fail to work on an encrypted (LUKS?) ext4 FS when encryption seemed to me to sit below the filesystem (since AFAIK ext4 doesn't support encryption itself)?

Re:My one-liner Linux Dropbox client by cpach on Tuesday December 25, 2018 @06:32AM (#18757029)
I too was a bit surprised by that statement. But according to Dropbox, full disk encryption should work fine.

”If you received a notification on Linux and you are running ext4, it may be because you are also running ecryptfs. ecrypfts is not supported. However, we support full disk encryption systems, such as LUKS for Linux users.”

Source: https://www.dropboxforum.com/t5/Error-messages/Dropbox-clien...

Re:My one-liner Linux Dropbox client by lloeki on Tuesday December 25, 2018 @07:03AM (#18757110)
Oh, I can see why ecryptfs would be a pain to support, but I always considered it to be some kind of an epic-scale hack.
Re:My one-liner Linux Dropbox client by kgbme on Tuesday December 25, 2018 @12:28PM (#18758192)
Perfect, thank you for the -forum- link! :)
Re:My one-liner Linux Dropbox client by cpach on Tuesday December 25, 2018 @02:04PM (#18758738)
De nada :)
Re:My one-liner Linux Dropbox client by discordianfish on Tuesday December 25, 2018 @08:10AM (#18757267)
It's FUD. ext4 with LUKS, which is what pretty much everyone is using on a desktop, is still working and the client supported.
Re:My one-liner Linux Dropbox client by geofft on Tuesday December 25, 2018 @02:31PM (#18758845)
Ubuntu's installer for a long while set up an "encrypted home directory" using eCryptFS, i.e., file-level encryption on top of ext4. That's the thing Dropbox is finding painful to support.

Migrating away from that to block-level "full disk" encryption basically requires copying all your files. If you're using <50% of your disk and you feel comfortable doing tricks with partition resizing you can do it, otherwise the best approach is to back up your files (hopefully to encrypted media...) and restore them.

Re:My one-liner Linux Dropbox client by pmlnr on Tuesday December 25, 2018 @09:59AM (#18757630)
No, it's not FUD. encrypted ext4 is encfs and ecryptfs, not xy on LUKs, and yes, they did drop support.
Re:My one-liner Linux Dropbox client by pritambaral on Tuesday December 25, 2018 @11:01AM (#18757845)
Just FYI: Ext4 has file-level encryption built-in now [1, 2], so 'encrypted ext4' is actually different from encfs and ecryptfs.

[1]: https://www.kernel.org/doc/html/v4.19/filesystems/fscrypt.ht...

[2]: https://wiki.archlinux.org/index.php/ext4#Using_file-based_e...

Re:My one-liner Linux Dropbox client by pmlnr on Thursday December 27, 2018 @09:40AM (#18769656)
I didn't know this, that's new for me.
Re:My one-liner Linux Dropbox client by geofft on Tuesday December 25, 2018 @02:32PM (#18758849)
It's potentially misleading phrasing. "Unencrypted ext4" means that the filesystem Dropbox sees has to be actual ext4, not an encryption layer on top. There can be an encryption layer under it, and generally full-disk encryption works that way, by encrypting a block device and letting you run whatever filesystem you want on top.

"Unencrypted or decrypted ext4" might be slightly more accurate (although I guess it maybe sounds like you need to remove encryption, not that you just need to decrypt files in memory).

Re:My one-liner Linux Dropbox client by cyphar on Tuesday December 25, 2018 @07:50PM (#18759858)
"Encrypted ext4" most likely refers to ext4's built-in support for file-based encryption.
Re:My one-liner Linux Dropbox client by lukeschlather on Tuesday December 25, 2018 @11:02AM (#18757853)
In fairness, it's pretty difficult (read: impossible) to enable full-disk encryption on an NVME drive (read: most Ultrabooks including the Dell XPS "Developer Edition.")

https://www.dell.com/community/Linux-Developer-Systems/XPS-1...

Re:My one-liner Linux Dropbox client by jkaplowitz on Tuesday December 25, 2018 @11:40AM (#18757974)
Full-disk encryption usually means encryption at the block layer below the filesystem. It doesn't actually have to cover the full disk.

There is almost always at least one unencrypted partition on machines with full-disk encryption, since the boot loader and then the decryption routine have to be launched from somewhere. And yes, OEM recovery partitions or similar laptop-specific needs are another case.

Full-partition would be a more accurate term than full-disk.

Re:My one-liner Linux Dropbox client by wereHamster on Tuesday December 25, 2018 @11:55AM (#18758023)
I use full-disk encryption on my old thinkpad. As in, the whole disk is encrypted, from first sector to last. There isn't even a MBR or a partition table on it! I boot the laptop from my USB stick which contains the kernel and initrd. That's what I call full-disk encryption ;)
Re:My one-liner Linux Dropbox client by jkaplowitz on Tuesday December 25, 2018 @01:14PM (#18758474)
Cool. :) Even there, you do have some disk or partition unencrypted, it just happens to be on removable media. Good counterexample, though uncommon.
Re:My one-liner Linux Dropbox client by btown on Tuesday December 25, 2018 @02:30PM (#18758835)
Just make sure nobody swaps out your stick :)
Re:My one-liner Linux Dropbox client by CodeXs on Tuesday December 25, 2018 @01:07PM (#18758422)
I would love to see a post on how to set that up!
Re:My one-liner Linux Dropbox client by wereHamster on Tuesday December 25, 2018 @04:19PM (#18759265)
If you've ever installed gentoo, then it shouldn't be too difficult. Follow the installation steps but instead of partitioning the harddrive and installing into one partition, make the filesystem across the whole harddrive (eg. `mkfs.ext4 /dev/sda`) and install into that. The system on the laptop (Lenovo X61) is really old (like 8 years at least), back then I needed to perform some manual steps to ensure the initrd has the necessary tools so it can mount an decrypt the root partition, this is probably not necessary anymore. Upgrading kernels has to be done carefully, because I must make sure the USB stick contains a compatible kernel. I also need to configure the UEFI boot menu so that it knows where to find the kernels. Fun stuff.

I wouldn't know where to start if you want to use ubuntu or another more user friendly distribution though.

Re:My one-liner Linux Dropbox client by dpg23 on Wednesday December 26, 2018 @12:37PM (#18763353)
You _can_ do it with libreboot on ancient thinkpads, but it requires a decent time (or money) investment and some know-how. https://libreboot.org/docs/gnulinux/encrypted_trisquel.html
Re:My one-liner Linux Dropbox client by icelancer on Tuesday December 25, 2018 @01:42PM (#18758647)
DiskCryptor does it in Windows fairly easily and lets you install the bootloader to USB.
Re:My one-liner Linux Dropbox client by saagarjha on Tuesday December 25, 2018 @06:17PM (#18759578)
Isn’t this how FileVault works?
Re:My one-liner Linux Dropbox client by FullyFunctional on Tuesday December 25, 2018 @08:10PM (#18759913)
Be more respectful. It broke my workflow which is having my $HOME on NFS which is also nuked with the stupid Dropbox change.
Re:My one-liner Linux Dropbox client by Spivak on Wednesday December 26, 2018 @05:06PM (#18765335)
Add it to the already long list of software that misbehaves over NFS.

Ceph/RBD with the filesystem of your choice that supports xattrs is pretty much the only way to get full application compatibility.

Re:My one-liner Linux Dropbox client by FullyFunctional on Friday December 28, 2018 @12:02AM (#18774983)
NFS is widely supported and has great performance. I'm open for alternatives, but only if supported by FreeNAS where my files live.
Re:My one-liner Linux Dropbox client by romeisendcoming on Thursday December 27, 2018 @10:00AM (#18769759)
Why don't I just keep my data in a database then?
Re:My one-liner Linux Dropbox client by Spivak on Friday December 28, 2018 @12:05AM (#18774991)
That's essentially what Ceph does. It's just implementing a filesystem interface on top of a generic object store.
Re:My one-liner Linux Dropbox client by romeisendcoming on Friday December 28, 2018 @08:03AM (#18776484)
Yes, sorry, there was sarcasm involved.
Re:My one-liner Linux Dropbox client by treve on Tuesday December 25, 2018 @11:12AM (#18757889)
When installing Ubuntu from scratch and follow defaults you end up with ecryptfs, not LUKS
Re:My one-liner Linux Dropbox client by CraftThatBlock on Tuesday December 25, 2018 @01:25PM (#18758540)
They recently (around 17.10 I think) removed encryptfs, they only support LUKS now.
Re:My one-liner Linux Dropbox client by feb on Tuesday December 25, 2018 @07:08AM (#18757125)
That news hit HN top stories a few months ago: https://news.ycombinator.com/item?id=17732912
Re:My one-liner Linux Dropbox client by shocks on Tuesday December 25, 2018 @09:41AM (#18757578)
Doesn’t work on ZFS either. I dropped Dropbox because of this.
Re:My one-liner Linux Dropbox client by AntiqueFig on Tuesday December 25, 2018 @11:38AM (#18757962)
You can create a zvol for your dropbox folder and format it in ext4 and it'll work: https://pthree.org/2012/12/21/zfs-administration-part-xiv-zv...
Re:My one-liner Linux Dropbox client by sp332 on Tuesday December 25, 2018 @10:20AM (#18757703)
Or btrfs. Good thing I had a spare external hard drive I could dedicate to dropbox storage, because I'm sure not converting my drive array to a different FS just for that.
Re:My one-liner Linux Dropbox client by monochromatic on Tuesday December 25, 2018 @09:54AM (#18757616)
Why would an application like this care what file system it’s running on?
Re:My one-liner Linux Dropbox client by int0x80 on Tuesday December 25, 2018 @01:27PM (#18758558)
In principle I agree with you, and many could argue the the app is broken. But in all fairness it is not so easy. Then there are lots of little details and corner cases where filesystems that implement a POSIX fs have slightly different semantics. This is important for example when dealing with sync'ing files to disk/backend. Encryption is another problem. Error handling. See for an example the annoying details here:

https://danluu.com/file-consistency/ http://danluu.com/filesystem-errors/

Re:My one-liner Linux Dropbox client by userbinator on Tuesday December 25, 2018 @01:40PM (#18758637)
Encryption is another problem.

I thought the whole point of an encrypting filesystem was that applications using it would not need to care about such things? Unless you're going below the FS abstraction and actually accessing blocks of the device directly, it shouldn't matter.

Re:My one-liner Linux Dropbox client by geofft on Tuesday December 25, 2018 @02:45PM (#18758903)
One of the weird things about an encryption layer on top of a filesystem like eCryptFS (as opposed to encrypted block storage) is that it needs to encrypt and MAC the filenames somehow, but the underlying filesystem has maximum lengths on the filenames, so whatever space you're using for padding and authentication code needs to be squeezed in. And you also need to potentially find an encoding of the encrypted data in case the underlying filesystem doesn't treat filenames as bytes-except-for-ASCII-slash (e.g., common Mac and Windows filesystems treat filenames as Unicode of some form, and Mac ones even do canonicalization). So, your encrypted filenames end up being longer than your decrypted filenames, which means that your maximum filename length is shorter than the underlying filesystem's maximum length.

For a system like Dropbox, which automatically renames files to things like "file.txt (userbinator's conflicted copy 2018-12-25)", this is a problem. For eCryptFS, whose limit is "we typically recommend you limit your filenames to ~140 characters", (https://unix.stackexchange.com/a/32834), the uncertainty is a problem too.

Dropbox could make this work (and did in the past), but they decided it would be more reliable to say they won't try and won't make promises about their client working 100% of the time on these filesystems. (And I guess their support or business department was not thrilled with the option of "we'll let you try but we won't support you even though you're paying".)

Re:My one-liner Linux Dropbox client by int0x80 on Tuesday December 25, 2018 @01:59PM (#18758718)
With LUKS it doesn't matter. But not all encryption methods are like that. That was just really an example of potential differences. In fact, when this (Dropbox dropping non ext4 support) happened the problem that triggered this was encryption related IIRC.
Re:My one-liner Linux Dropbox client by ric2b on Wednesday December 26, 2018 @01:52PM (#18763871)
They could just give you warnings that the FS isn't supported. Instead the client refuses to run if it's not on a supported FS, even though it would very likely work fine.
Re:My one-liner Linux Dropbox client by int0x80 on Wednesday December 26, 2018 @07:57PM (#18766298)
I agree here. But they just want to cover their asses I guess.
Re:My one-liner Linux Dropbox client by hannasanarion on Tuesday December 25, 2018 @10:26AM (#18757720)
It shouldn't have to. Dropbox ran fine on all filesystems for years. In September they sent everybody an email basically saying "you can't use Dropbox anymore, bye bye"
Re:My one-liner Linux Dropbox client by sly010 on Tuesday December 25, 2018 @10:30AM (#18757737)
If I care to guess, because if you go an abstraction lower you can do your job better. Dropbox actually uses kernel drivers on some platforms (not sure on Linux).

I guess power users are not the target market.

Re:My one-liner Linux Dropbox client by Spivak on Wednesday December 26, 2018 @05:13PM (#18765375)
Because different filesystems have different features and xattrs is one which isn't implemented everywhere.

Another example of features not implemented everywhere is the cornucopia of file locking APIs which is why SQLite doesn't officially support being run on NFS.

Re:My one-liner Linux Dropbox client by toomuchtodo on Tuesday December 25, 2018 @10:25AM (#18757715)
Filesystem primitives the application requires to deliver the desired functionality.
Re:My one-liner Linux Dropbox client by leowoo91 on Tuesday December 25, 2018 @08:30AM (#18757329)
I'm not a an active dropbox user but I find this very surprising. Next question is, why wouldn't they open source the client libraries? Supporting many platforms is already a huge task.
Re:My one-liner Linux Dropbox client by glennpratt on Tuesday December 25, 2018 @10:24AM (#18757714)
I have Git repos that can't be cloned onto encyptfs, so it's not surprising to me. Make an encrypted partition or just encrypt your entire disk.
Re:My one-liner Linux Dropbox client by qplex on Tuesday December 25, 2018 @09:04AM (#18757436)
Ext4 does support encryption. [0] https://lwn.net/Articles/639427/