drandom3
drandom3

Reputation: 199

Flutter requires sudo when in my own user folder

I am setting up Flutter, but am only able to run flutter commands by adding sudo before the command.

The error I get is:

shlock: 
    open(/Users/drandomuom/dev/flutter/bin/cache/shlock97760): 
    Permission denied

I'm not sure why I'm getting this, as I'm working in my own home folder.

Any advice would be great. Thanks.

I have tried running in zsh and bash, I have checked the folder permissions and have read & write

Upvotes: 1

Views: 3549

Answers (1)

drandom3
drandom3

Reputation: 199

After looking at jww's edit, I started looking into user permissions in linux. I found that the folder for flutter was owned by root, rather than my actual profile. To test this, I created a new profile on the laptop, and reinstalled flutter. This time, the folder was owned by my user, and I am able to run the flutter commands normally. I must have installed it with the sudo command originally.

Upvotes: 1

Related Questions