F
F
Fenix9572016-09-13 15:27:25
linux
Fenix957, 2016-09-13 15:27:25

Restore chmod rights?

In general, the guys here an incident happened.
Played around on a server. and accidentally changed the rights to / bin
and now I can’t run any programs, including chmod to return everything to its place
. There is no physical access. only remote. I have an ssh session from which I can execute commands. It is no longer possible to open a new session.
when trying to execute any command from
/bin
/usr/bin
-bash: /bin/ls: Permission denied
Now authorized as root
How to get out?)

Answer the question

In order to leave comments, you need to log in

3 answer(s)
L
landergate, 2016-09-13
@Fenix957

sudo /lib/ld-linux.so /bin/chmod 755 /bin/chmod
Or:
Or:
The path in different distributions and bitness may differ.

R
Rsa97, 2016-09-13
@Rsa97

Do you have FTP or SFTP access? Connect remotely, change permissions to chmod.

S
sflyer, 2016-09-22
@sflyer

Start from Live CD.
mount /dev/sdx1 /media/hard
There are two options:
1) Debian-like - chmod 775 /media/hard/bin
2) RPM - based
a) chroot /media/hard
b) chmod 775 /media/hard/bin

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question