You are not logged in.

#1 2010-02-25 19:45:23

commodore256
Member
Registered: 2009-08-29
Posts: 24

Help, I'm locked out of my /tmp directory!

I tried

sudo chmod -R 666 /tmp

sudo chmod -R 000 /tmp

sudo chown -R username /tmp

I own everything that's in there, but I can't even read the files.

That's not the stupidest thing that I've done in linux, I've actually set my username under the root group about 2 years ago. (that was really fun going online and being root)

Offline

#2 2010-02-25 19:52:32

Ashren
Member
From: Denmark
Registered: 2007-06-13
Posts: 1,229
Website

Re: Help, I'm locked out of my /tmp directory!

Could you please post a "ls -la" for /tmp.

Offline

#3 2010-02-25 19:55:27

commodore256
Member
Registered: 2009-08-29
Posts: 24

Re: Help, I'm locked out of my /tmp directory!

d---------  14 me   root  4096 Feb 25 14:32 tmp

Last edited by commodore256 (2010-02-25 19:55:39)

Offline

#4 2010-02-25 19:58:18

Ramses de Norre
Member
From: Leuven - Belgium
Registered: 2007-03-27
Posts: 1,289

Re: Help, I'm locked out of my /tmp directory!

Is that after your chmod 000 ? Try doing

sudo chmod -R 777 /tmp

and post again the output of ls -la /tmp .

Offline

#5 2010-02-25 20:04:30

commodore256
Member
Registered: 2009-08-29
Posts: 24

Re: Help, I'm locked out of my /tmp directory!

Did that before and it said "Permission Denied"

I did it as root and got this:

total 64
d--------- 14 me   root  4096 Feb 25 14:32 .
drwxr-xr-x 20 root root  4096 Feb 25 14:14 ..
d---------  2 me   root  4096 Feb 25 14:22 cron.DuKi2t
d---------  2 me   audio 4096 Feb 25 14:20 .esd-1000
d---------  2 me   root  4096 Feb 25 14:19 .ICE-unix
d---------  2 me   audio 4096 Feb 25 14:19 keyring-D2k2fi
d---------  2 me   audio 4096 Feb 25 14:26 orbit-me
d---------  2 me   gdm   4096 Feb 25 14:19 orbit-gdm
d---------  2 me   root  4096 Feb 25 14:28 orbit-root
d---------  2 me   audio 4096 Feb 25 14:20 pulse-eQdbF7p7NmXd
d---------  2 me   audio 4096 Feb 25 14:19 ssh-bvLbRS1665
----------  1 me   root    11 Feb 25 14:19 .X0-lock
d---------  2 me   root  4096 Feb 25 14:19 .X11-unix
----------  1 me   audio  402 Feb 25 14:19 .xfsm-ICE-3UOR8U
d---------  5 me   audio 4096 Feb 25 14:28 yaourt-tmp-me
d---------  5 me   root  4096 Feb 25 14:28 yaourt-tmp-root

but I change the ownership and permissions recursively to 666 and then 000 and chown -R me /tmp

Last edited by commodore256 (2010-02-25 20:04:56)

Offline

#6 2010-02-25 20:07:09

Ashren
Member
From: Denmark
Registered: 2007-06-13
Posts: 1,229
Website

Re: Help, I'm locked out of my /tmp directory!

Try the following:

chmod 777 /tmp
chown root:root /tmp
chmod +t /tmp

The sticky bit is needed for /tmp as it ensures only owners of the dirs can delete them.

Edit: Just saw your last post. If you need to recover any files you can chown them with: "chown -R username:users dirname/" and make the r/w'able with  "chmod 644 dirname/".

Last edited by Ashren (2010-02-25 20:10:56)

Offline

#7 2010-02-25 20:09:23

commodore256
Member
Registered: 2009-08-29
Posts: 24

Re: Help, I'm locked out of my /tmp directory!

That good, but I can't access the directories inside.
edit: just saw your edit and gonna try something

Thanks, I have full access

Last edited by commodore256 (2010-02-25 20:12:42)

Offline

Board footer

Powered by FluxBB