Unable to access folder

Asked by Sam

hi

I am log on ubuntu as administrator and on command terminal its show below
ashish@ashish-laptop:~$

here i applied sudo su command this output is as follow
root@ashish-laptop:/home/ashish#
and apply following commands

root@ashish-laptop:/home/ashish#cd Desktop

root@ashish-laptop:/home/ashish/Desktop#mkdir tmp
root@ashish-laptop:/home/ashish/Desktop# cd tmp
root@ashish-laptop:/home/ashish/Desktop/tmp#

Now lock icon is displaying on the folder and when i try to access this folder n try to do some changes error is showing that you are not the owner. You cannot change the permission.

" And the owner is showing as root."

I am only the administrator thn why I cant do any changes on this folder n how I can changes its ownership or can access this folder.

Kindly help me

thanks

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Ian Ace
Solved:
Last query:
Last reply:
Revision history for this message
Best Ian Ace (iaculallad) said :
#1

Yes, it should display a lock folder since you created it using a root privilege. You can own it by using chown:

sudo chown -r ashish:ashish /home/ashish/Desktop/tmp

HTH.

Revision history for this message
marcobra (Marco Braida) (marcobra) said :
#2

Warning: Please don't use this way (login as root user) to works in Ubuntu or you will get serious issues...

Revision history for this message
Sam (garg-k-ashish) said :
#3

Hi

Ian@ where I have to apply this command on root terminal or my administrator terminal

Thanks marcobra for your kind advice but I am only the user who using root privileges so I think not so risk is there... N not using internet too on that.............

Revision history for this message
Sam (garg-k-ashish) said :
#4

Thanks Ian Ace, that solved my question.

Revision history for this message
marcobra (Marco Braida) (marcobra) said :
#5

I always prefer to made a login with a regular user and when i need to be a real root user i always use:

sudo -i

but i never used it... ;-) and my system is working without any issue from about 5 years never reinstalled... only upgraded...