0

I have a brand new installation of Ubuntu 16.04 on my HP stream 11-001nd. It's the only OS on installed without any partitions.

Now I want to create /etc/pm/config.d/config.

I clicked on the right mouse button to select new document. This appears to be not selectable. So I went to properties, permissions, and there is shown at the bottom of that window, You are not the owner, so you cannot change these permissions.

Well, if I'm not the owner, who is? How can I change this so I'll be able to create that file.

1

There are (at least) two users in any Ubuntu installation. Both are in your control.

The two are

  • Your user
  • root user - Linux equivalent of administrator account. Has all powers. Handles administrative tasks.

Now, your user only has access to your personal files. All other files, which are essential configuration and system files, are owned by root.

How do I access them?

The root account can only (unless you willingly workaround this) is by using sudo. sudo is the program that allows normal users (like you) to run programs with powers of the administrative root user.

Hit Alt+F2 and type gksudo nautilus in it and hit Enter.

A dialog asking for a password will appear. Enter your password and hit Enter or Click OK.

The file manager should open, but this time it is run with root's powers. You can now do anything, including creating that file.

Why are there two accounts if I can access it anyway?

Privilege separation — the idea that you should only get the power to do/destroy anything when you need it. A major contributor to Linux's excellent reputation for security is due to the fact that it separates admin from user.

If you would run as root all the time, any virus could destroy your system very easily.

3

The mentioned folder is owned by root, so you should create and edit the file as root. To achieve that, you can press Alt+F2 and type

gksu gedit /etc/pm/config.d/config

You will be prompted for root password.

If you are familiar with terminal, you can easily create the file with command

sudo nano /etc/pm/config.d/config

(substitute nano with your favorite text editor)

0

Use the following command

su administrator

"Enter root password of admin"

cd "path of the file"

sudo gedit "filename"

Root is the equivalent default super user to administrator. As your standard account does not have permission, you have to switch back to administrator or root user. su command will switch the username passed as a root user.

0

This is happening because you don't own the file.
To get access to file just do the following.

  1. Open the terminal and type:

    $sudo -s
    
  2. Type the administrator password.
  3. Then do, (don't forget to substitute the username)

    $cd /home/[username]/.config
    $chmod 777 opera
    

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.