This question already has an answer here:
- Change folder permissions and ownership 6 answers
New to using CLI OS.
So I tried changing the owner of a particular folder from root to my user so I can avoid errors of access denied whenever I would publish my dotnet app.
Basically, this is the folder structure.
myAppFolder | ->myApp | ->All forders that make the app(folders, .cs, .sln and the likes) ->publish ->README.md
When I use
ls -lart on myAppFolder it says that the owner is the root. Though when I go inside and
ls -lart in it some files/folders' owner is my user already. I figured that if I use
'sudo chown -R user myAppFolder' it should also change the owner of all it's subfolders because of the recursive flag. (Correct me if I'm wrong.) But when I did execute the command the ownership did not change to my user. Is there something I'm missing here? Is my understanding of the used command wrong?
The referenced Change folder permissions and ownership is where I actually got the command I used, I just edited it to
'sudo chown -R user myAppFolder' because I was already in the folder that contained myAppfolder which is /apps.