I am running a terminal script that simply reads files and it will not read certain files with out an error.

I have tried 3 things

  • Using sudo - sudo node getInfo
  • Setting macOS to allow terminal full access to disk - see this SO post
  • Verified that the files are not protected by SIP - ls -lO some_apth

Here are a few of the error codes and paths:

Enoent means error no entry and applies that the file is not there - see here which is odd b.c. the file system is reporting them as there.

I can also cd into the directories and view the files.

ENOENT ../../../Library/Containers/com.apple..NowPlayingWidgetContainer/Data/Documents/iChats

ENOENT ../../../Library/Containers/com.apple..NowPlayingWidgetContainer/Data/Library/ColorSync

ENOENT ../../../Library/Containers/com.apple..NowPlayingWidgetContainer/Data/Library/Components

ENOENT ../../../Library/Containers/com.apple..NowPlayingWidgetContainer/Data/Library/Filters

closed as unclear what you're asking by fsb, nohillside May 21 at 5:48

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • Sounds like your current working directory is off. Are you sure the current working directory for the script is actually the same as where you're testing these relative paths? - Check that - or change your script to use absolute paths instead. – jksoegaard May 20 at 21:50
  • This part of the path, ../../../ ,takes me to my home directory. I'll switch to absolute paths for testing purposes but what makes you think this is the issue? – Sun - FE May 21 at 0:00
  • In macOS this is where Library/ resides ... in the home directory. – Sun - FE May 21 at 0:00
  • Those container folders are for sandboxed applications. I suspect some of what you are seeing are broken links to areas where the app is not allowed access. – red_menace May 21 at 1:27
  • What do you mean by broken links? I am able to cd into these directories from the terminal? – Sun - FE May 21 at 1:30

Browse other questions tagged .