I've logged on as an administrator user but I can't even save files using my IDE. Error mesage:

"Could not save project:
java.io.FileNotFoundException: /home/mike/Desktop/dl4j-0.4-examples/.idea/workspace.xml~ (Permission denied)" 

Is there a way to really log on as administrator?

Ubuntu looked so user friendly and then....

3 Answers 3


Open a terminal (ctrl+alt+t) and navigate to your home directory's desktop folder by typing cd ~/Desktop there do:

sudo chmod -R 744 dl4j-0.4-examples
sudo chown -R <your-user-name>:<your-user-group> dl4j-0.4-examples

Your user-group is usually the same as your user-name. This should set the permissions right for you. Note: you will be prompted for your password this is necessary to run a command as superuser (root).

You can as well do this by editing the directories properties in nautilus just start it from a terminal with:

gksudo nautilus

If your system complains about gksudo not found you might want to install the gksu package first to make this work by:

sudo apt-get install gksu 

The same can be achieved by typing:

pkexc nautilus
  • 2
    Isn't pkexc preffered over gksu? May 4, 2016 at 12:10
  • 1
    Works both the same way as far i know but i will add it to my answer. Thank you for pointing that out.
    – Videonauth
    May 4, 2016 at 12:14

I had a similar problem in my RubyMine IDE. Bu I had two problems, I could not edit the files (only readable) and the IDE could not save the project files.

My project folder somehow changed it's ownership to root (It was working well before) and not me (my username). So I changed the project ownership to me (my username) using sudo chown -R username:username ~/path/to/project/foldername/*, and it removed the read only status of the files, but it could not still save the project, though changes could reflect when I reload the browser.

It was not until I also noticed that the .idea files (inside my project folder) created by RubyMine IDE still had the owner as root. I then changed their ownership like sudo chown -R username:username ~/path/to/project/projectname/.idea/*, now I can to save the project files also.

NB: I had to specify the .idea files and not just the whole project folder like I did before.


Is there a way to really log on as administrator?

You should to log in as root. But first you must set unix password for root. Then you can log in by typing "su" in terninal. Or you can take root permissions typing "sudo su". If you want to log in as root in graphical desktop first you must enable this ability for root user.

  • How do I login a root? And set the root password? May 4, 2016 at 12:08
  • Open terminal. Then type "sudo passwd root" after that you will be promted about new linux password. For login as root in terminal type "su" May 4, 2016 at 12:14
  • @YevgeniyKlymenko Enabling root is a security risk that is unnecessary in this case. Users should NOT have to use root to run a user space IDE from their home folder in most cases.
    – Thomas Ward
    May 4, 2016 at 12:17
  • The question is about "Is there a way to really log on as administrator". So there is a valid answer. May 4, 2016 at 12:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .