Ubuntu Terminal not displaying current directories and Permissions Access Issue

Hello, my name is Derek Kim.

When I first downloaded Ubuntu my user had access to directories that I had made from “new folder” in windows, and directories that I drag and dropped into my home directory.

I came across this issue while installing some other software and went into my command line and changed my default user to root, then changed back to my user. After trying to solve it for a day, I decided to uninstall Ubuntu and reinstall, following the video under “Installing WSL and Ubuntu”.

I’m unable to get my Ubuntu terminal to show new directories that I’ve made via “new folder” in the home directory, without rebooting my PC. After I reboot my PC, the directories will appear but not highlighted. (Please see “tester/testy” compared to “test”).

I am able to access these directories using sudo su, however I would like my user to have the permissions to access these files and have my Ubuntu correctly identify the files in my home folder using ls.

If anyone has any advice on how to solve this, I would appreciate it very much.

I am on Windows 10.
I’ve attached a screenshot of my Ubuntu terminal.
Directory “test” was made in ubuntu using mkdir. test.
Directory “tester” and “testy” were both made using new folder in the home directory.
There is actually a 4th directory “testo” which was made as a “new folder” in the home directory, but fails to appear in my Ubuntu terminal with ls or ls -a.

(I reuploaded this topic because of a picture error.)

Hello Derek!

This was caused by the fact that some of your folders have different permissions than others. When you create a directory with root, then that directory gets write protection. This can be changed by using chmod as root to change the permissions.

In this screenshot I created a directory with root and showed that it has write protection by trying to remove it as my user

In this screenshot, I use chmod to change the permissions and then the directory becomes highlighted and I can remove it without trouble.

Command breakdown: chmod [users/groups you want to have access (I used “a” for “all”)]+[permission to give (I used “w” for “write”)] [the file/directory you are changing the permission of]

I found this helpful https://kb.iu.edu/d/abdb#:~:text=To%20change%20file%20and%20directory,%2C%20write%2C%20and%20execute%20permissions.

If this doesn’t work, go ahead and respond with the printout of “ls -la” and I will see if I can help further.

Good luck!!

1 Like

Thanks so much for the help Brandon! This does help me get access to my files from my user.