Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I got a scenario where a customized Ubuntu 12.04 Linux OS has a read only filesystem which doesn't have terminal access. My goal is to create a file with root access using normal users permission. I got few configuration directories which have 777 permission as normal user "NOT AS SUDO".

I would like to know if there is any exploit or alternate way to setuID 0 to a file from the normal user? I can't do GRUB related stuff to the root system because GRUB timeout is 0.

share|improve this question
"create a file with root access using normal users permissions" What kind of access? What do you want the file to do, is it a script? Do want to change file ownership? A little more explanation to what you want would help others answer it well. – precise Nov 20 '13 at 6:56
And could you also post the output of ls -l PATH_TO_YOUR_DIRS/.. and ls -l / please. – precise Nov 20 '13 at 7:04

Simple answer is if the file is owned by you and you have proper permissions over it, then you can perform various operations over it (ex. like edit it.)

But, if the owner of the file is root and you as a normal user don't have appropriate permissions over it then you can't perform any operation over it.

To change the permission of the file you will need to use sudo before the command like:

sudo chmod <permissions> <file-name>

then it will ask you password and check if your username is in sudoer's file, only then you will have the permission to modify its permissions or various other operations which require super user privileges.

This is a security measure in Ubuntu which prevents unprivileged users to harm your system.

share|improve this answer
I understand that there is no privilege escalation exploit in Linux to handle this task. – Prabhu Are Nov 27 '13 at 5:13

No other way you can change owner of file as root privilege file, chmod 777 is the only way I can think.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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