2

Background: Catalina removes access from the root filesystem. We can not create directories there even as sudo and even when disabling SIP. There appears to be a kind of workaround by using /etc/synthetic.conf.

Here is the contents of my /etc/synthetic.conf

  data    /Users/steve/data
  git     /Users/steve/git
  shared  /Users/steve/shared

I have created those directories under my home directory and rebooted.

$ls -lrta /Users/steve/data /Users/steve/shared
/Users/steve/data:
total 0
drwxr-xr-x    2 steve  staff    64 Apr 11 19:02 .
drwxr-xr-x+ 250 steve  staff  8000 Apr 13 11:29 ..

/Users/steve/shared:
total 0
drwxr-xr-x    2 steve  staff    64 Apr 11 19:02 .
drwxr-xr-x+ 250 steve  staff  8000 Apr 13 11:29 ..

$ls -lrta /Users/steve/data /Users/steve/gut
/Users/steve/git:
total 0
drwxr-xr-x    2 steve  staff    64 Apr 11 19:02 .
drwxr-xr-x+ 250 steve  staff  8000 Apr 13 11:29 ..

So those directories do exist ..

But then using the link from /etc/synthetic.conf does not work the way I had expected:

(base) 11:29:14/git $ls -lrta /data
ls: /data: No such file or directory

How is that association/link supposed to be used?

Update Permissions for /etc/synthetic.conf are

enter image description here

  • Full command: echo -e 'data\tUsers/steve/data\ngit\tUsers/steve/git\nshared\tUsers/steve/shared\n' | sudo tee -a /etc/synthetic.conf to avoid vim ;-) – klanomath Apr 13 '20 at 20:01
3

First make sure that you have created the file with the correct file permissions:

  Owner: root 
  Group: wheel

  Owner: read+write
  Group: read
  Everyone: read

Make sure that the two columns in your file are seperated by tab characters, and not just spaces.

Additionally the names of your existing folders probably need to be written without the leading slash. At least this is how the man page specifies it, and it is the only way I have tried it - it might work with a leading slash though.

I.e. you need to write Users/steve/data instead of /Users/steve/data.

Next ensure that you have rebooted your system after modifying or creating synthetic.conf. The links are only available after a reboot.

  • I did all these afaict. I will double check that the tab did not get replaced by spaces at some point. Update: it appears the tab may have been replaced with spaces by one of the editors automatically at some point. I'm fixing now – StephenBoesch Apr 13 '20 at 19:31
2

The linked folders in synthetic.conf must not contain leading slashes (and the two columns must be seperated by tab characters as jksoegaard mentioned already):

Modify /etc/synthetic.conf to

data    Users/steve/data
git     Users/steve/git
shared  Users/steve/shared

and reboot!

  • Thanks i missed that. I can't get vim to stop replacing tab with space.. gimme couple mins.. – StephenBoesch Apr 13 '20 at 19:42
  • I turned off expandtab but can not get vi to stop the conversion for the life of me. Trying your command line now. I awarded to @jksoegaard simply due to his geting there a tad sooner: but both of you helped equally – StephenBoesch Apr 13 '20 at 19:50
  • i'm going to ask a separate question about this vim nonsense – StephenBoesch Apr 13 '20 at 19:50
  • .all working now thx . i had upvoted couple hours back but can only award to one person. It was bit of a coin flip. – StephenBoesch Apr 13 '20 at 21:58
  • 1
    @chrylis-onstrike-: It appears to be a phonetic mis-spelling of "mustn't". I submitted an edit for review. – Jörg W Mittag Apr 14 '20 at 5:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .