Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Simple Terminal commands "not permitted"

22 views
Skip to first unread message

Chris

unread,
Jan 14, 2024, 8:22:34 AM1/14/24
to

Newish Mac. Installed iTerm2 and trying to navigate the filesystem, but
One Drive folders returning "Operation not permitted" for simple things
like 'ls'. I can 'cd' into these folders however. What gives?

Theo

unread,
Jan 14, 2024, 9:02:57 AM1/14/24
to
You need to give iTerm2 the 'access all files' permission, somewhere in
Settings->Security. It may want other permissions like access to photos.

By default apps don't get full filesystem access and so anything you run in
iTerm2 can't properly interact with files (including photos stored in your
pictures folder, which are a separate permission)

Theo

Bruce Horrocks

unread,
Jan 14, 2024, 9:11:54 AM1/14/24
to
Have those OneDrive folders synced locally yet? Finder may have the
necessary extensions added for OneDrive to be able to intercept requests
and get the files transferred before an error occurs, whereas the
command line might be too low level?

--
Bruce Horrocks
Surrey, England

Chris

unread,
Jan 14, 2024, 11:03:31 AM1/14/24
to
The only things shown under iTerm as not having access to files was
iCloud Drive which I don't use. It only has entries for "Desktop",
"Documents" and "Downloads". So it may be a problem for accessing
OneDrive, but I see how to fix it?

Chris

unread,
Jan 14, 2024, 11:04:44 AM1/14/24
to
On 14/01/2024 14:11, Bruce Horrocks wrote:
> On 14/01/2024 13:22, Chris wrote:
>>
>> Newish Mac. Installed iTerm2 and trying to navigate the filesystem,
>> but One Drive folders returning "Operation not permitted" for simple
>> things like 'ls'. I can 'cd' into these folders however. What gives?
>
> Have those OneDrive folders synced locally yet?

Yes OneDrive has been running for a few weeks now.

> Finder may have the
> necessary extensions added for OneDrive to be able to intercept requests
> and get the files transferred before an error occurs, whereas the
> command line might be too low level?

I do see your point, but then how does 'cd' work just fine?

Bruce Horrocks

unread,
Jan 14, 2024, 3:12:56 PM1/14/24
to
On 14/01/2024 16:04, Chris wrote:
> On 14/01/2024 14:11, Bruce Horrocks wrote:
>> On 14/01/2024 13:22, Chris wrote:
>>>
>>> Newish Mac. Installed iTerm2 and trying to navigate the filesystem,
>>> but One Drive folders returning "Operation not permitted" for simple
>>> things like 'ls'. I can 'cd' into these folders however. What gives?
>>
>> Have those OneDrive folders synced locally yet?
>
> Yes OneDrive has been running for a few weeks now.

This is the main thing. If all synced then it's a permissions/security
thing.

>> Finder may have the necessary extensions added for OneDrive to be able
>> to intercept requests and get the files transferred before an error
>> occurs, whereas the command line might be too low level?
>
> I do see your point, but then how does 'cd' work just fine?

Directories stopped being "regular files" a long time ago. Presumably
ADFS holds its directory information in such a way that reading it
doesn't trigger the security intervention that is stopping you accessing
normal files.

Bruce Horrocks

unread,
Jan 14, 2024, 3:17:10 PM1/14/24
to
What are you looking at when you say "The only things shown *under*
iTerm..."?

When I look in Settings -> Privacy & Security I only see a list of
applications *under* Files and Folders, not the other way around.

Chris

unread,
Jan 14, 2024, 5:51:10 PM1/14/24
to
Correct and if you expand the content for an application e.g. iTerm it
then shows a list of *Folders* to which the user has (dis)allowed access.

I note that some applications do show OneDrive as an entry, just not
iTerm. Looks like I need to trigger an access request for OneDrive from
iTerm. Any ideas how?

Chris

unread,
Jan 14, 2024, 5:58:07 PM1/14/24
to
Fixed it! I needed to allow iTerm2 "Full Disk Access" under "Privacy &
Security". I might toggle that on and off as needed, just in case.

Thanks Bruce and Theo for pointing me in the right direction.

0 new messages