[OSX-Users] The Personal Data Issue
Leslie Carr
lac at ecs.soton.ac.uk
Thu Oct 6 11:58:21 BST 2016
I suppose technically, hard links are at the file system level but soft (symbolic) links are at the libc system call level.
On one of our early UNIX systems (before your time) there was a way to alter the interpretation of the soft link's destination. There were sys5 and bsd "universes" which caused the interpretation of your /lib and /bin symbolic links to be different.
Prof Leslie Carr
Web Science institute
#⃣ webscience #⃣ openaccess
> On 6 Oct 2016, at 12:51, Jules Field <Jules at ecs.soton.ac.uk> wrote:
>
> There are aliases, soft links and hard links.
>
> Aliases are the Mac's equivalent of Windows Shortcuts. They are just a normal file, but one that tells macOS where to find the file it points to. Nothing apart from macOS will understand them, everything else will just see a normal (but pretty useless) file.
>
> Soft links are at filesystem level, and are a standard feature of Unix filesystems. I don't know if Dropbox follows them or not. They are a filesystem object that gives a (relative or absolute) path to the file they point to. Created with "ln -s filename new-linkname". At file level (e.g. calling open() or using most Unix commands that handle files) they will be automatically followed. But at directory level (e.g. "ls", "rm", "mv") they won't be automatically followed. Many commands such as "tar" have a "-h" option to force them to follow soft links, as otherwise they won't.
>
> Hard links are at filesystem level, but lower-level than soft links, and are a standard feature of Unix filesystems and NTFS (though Windows doesn't encourage users to use them). Dropbox will have to follow them, as does everything else, as it can't tell the difference between that and a normal file. Created with "ln filename new-linkname". If you imagine that the "file contents object" and the directory entry are totally separate things, a hard link is merely another directory entry that points to the same file contents object. All the ".." directory entries that point to the parent directory are just all hard links to the same place. The "." directory entry is just a pointer to the directory itself. There are protections in place to make sure you can't do silly things like delete "." or ".." (fsck will try to put them back if you manage it!). You also can't[1] make a hard link to a directory, but only to a file. If you could make a hard link to a directory, you could make a loop. That would be "A Bad Thing(tm)".
>
> [1] The exception is hfs on Macs, where this feature is actively used to implement non-networked Time Machine backups, and was added by Apple specifically for Time Machine. I *believe* the "ln" command on macOS won't let you create them, as it's a very bad idea unless you are very careful (which Time Machine is). If you wander round the internal structure of a non-networked Time Machine backup and start link counting, you will fairly quickly see how it is implemented. The result is quite elegant and a very neat trick, enabling trivially simple restores and pruning of the oldest backups while guaranteeing you still have at least 1 copy of every file.
>
> To see how many directory entries point to the same file, do an "ls -al" and look at the number just to the left of the owner's username. The number given for "." should be the number of files and sub-directories in that directory (excluding .. of course) + 1 for "." itself + 1 for the entry in the parent directory that points to this one.
>
> Hopefully by now you're regretting ever bringing up the topic in the first place. ;-)
>
> Cheers,
> Jules.
>
>> On 06/10/2016 09:48, Hugh Davis wrote:
>> The same had occurred to me, and this is exactly why I used aliases rather than making links. I do have links all over the place in my folders and Dropbox definitely treats them differently to aliases.
>>
>> Dropbox does not follow the Aliases and if you check this from the Dropbox web interface you get a deadend at the Alias.
>>
>>
>> Hugh Davis
>>
>>
>>
>>
>>
>> On 6 Oct 2016, at 09:43, Chris Andrews <w at lfie.org<mailto:w at lfie.org>> wrote:
>>
>> Have you checked how the folders appear in the Dropbox web interface? I seem to remember that Dropbox at one point followed certain pointers - think it was hard links rather than aliases, but might be worth a look regardless.
>>
>> Cheers,
>>
>> Chris
>>
>> On Thursday, October 6, 2016, Hugh Davis <hcd at soton.ac.uk<mailto:hcd at soton.ac.uk>> wrote:
>> Of course, I have *never* committed the crime of keeping other peoples’ personal data in Dropbox, but the recent conversation on this list led me to thinking about how I could continue to use Dropbox as my main backup and sync mechanism for my entire Documents repository EXCEPT personal data, while at the same time keeping any legitimately retained personal data backed up and synched “within" the University (OneDrive).
>>
>> So, I don’t know when people last looked at MS OneDrive? Until recently the “OneDrive for Business” version constantly crashed on OS/X and when it occasionally didn't crash it didn’t seem to sync reliably. The latest version of OneDrive, available from the MAC AppStore (and the IOS AppStore) seems to work perfectly (I’m on Sierra). When you install it asks if you want to use your “School” account, and then redirects you to an iSolutions login. It asks you where you want the OneDrive folder installed, and I choose a place that is not backed up by Dropbox. It is all then set up just like Dropbox, with a folder that you can put in your Finder. I can confirm that on my systems it works and syncs between systems (MacOS and IOS) just fine.
>>
>> So now what I have done is moved all my sensitive folders into the Onedrive directory, and in my Dropbox directory, where I would like these folders to appear I have put Aliases, so the whole directory navigation is seamless, and your personal data is “safe” in that it is backed up within the approved university systems (Microsoft!).
>>
>>
>> Hope this might be helpful.
>>
>> /h.
>>
>> Hugh Davis
>> Professor of Learning Technologies
>> Web and Internet Science Group
>> Electronics and Computer Science
>> Building 32 Rm 3033
>> Highfield Campus, University of Southampton, SO17 1BJ, UK
>> Tel: +44 (0)2380 593669
>> Co-ordinates at http://users.ecs.soton.ac.uk/hcd/
>> My calendar is at http://users.ecs.soton.ac.uk/hcd/hcdcal.html
>>
>>
>>
>>
>>
>>
>>
>
> Jules
>
> --
> Jules Field MEng MBCS CITP CEng
> email+iMessage: Jules at ecs.soton.ac.uk
> Twitter: @JulesFM
>
> Senior Tutor, Electronics and Computer Science
> Teaching Systems Manager, Faculty of Physical Sciences and Engineering
> University of Southampton SO17 1BJ, UK
>
> 'The owls are not what they appear.' - David Lynch (indirectly)
>
More information about the Osx-users
mailing list