[HELP] chmod -R 740 /

N

newbAlert

Guest
Hello everyone,

I am in need of help asap. I am completly new to Linux. Here is my problem. I logged in as root , I did this line:

chmod -R 740 /



It was literally changing the permissions for all file and directories, keep in mind I was using filezilla for this. After it went through them all I was disconnected from the server. It says "server unexpectedly closed network connection" when trying to log into the server via filezilla.

My goal was to limit access to all config files for I will be creating users and dictating user account. The users access a SFTP server for sensitive docs.

What did this command do that doesnt allow me to connect to the server?

Was there maybe a service that will need restarted? if so what can I do to restart it?


If anyone can help that would be greatly appreciated?

-Tim
 


You recursively changed all permissions of all files/folders below / to 740 on the system...

What I would do is go to my backup, reinstall the OS and get going again...

Otherwise, you'll need to boot off a disk/usbkey and manually chmod the directories/files back to what they should be... (I'm actually surprised no one has made a script to get someone out of this bind)..

Good luck - and log in as a user so this stuff won't happen to you :)
 
right on
thanks for the reply

This server is not local I use filezilla and putty to access the sftp server.
What should I do to resolve this when im not on site with the actual server?

-tim
 
You'll need to contact your hosting provider then.. ask them to restore the OS and restore your files from backup..
 
I'm just trying to get this straight, sorry.

I need to contact the host that the linux sftp server lives on so that they can actually restore it?
Will the data that was put into the some files be available after a restore? they were literally put on the server last night. I need to make them accessible to some users that I created asap. Its all private medical record information.

Do you have to create a backup or are they created for you periodically? When are backups created?
 
For the avoidance of doubt, you need to contact the company you are paying for the hosting of this server and seek their help.

It's unlikely they take automatic backups, but possible. It entirely depends on the hosting provider's policy and the service agreement you took out with them. There is no global standard for this.

Unfortunately though it sounds like you will need to get them to wipe it, reinstall and start again. Then, as mentioned by Rob earlier, create a normal user account, log in with that to work on things under that user id UNLESS you absolutely need root permissions to change the server configuration, rather than your application's config. That way you won't cripple your machine with a single command like you just did. One of the oldest rookie traps in the book that!

Furthermore I wouldn't rely on the hosting company doing backups for you unless you are explicitly paying them to do so, and have an SLA for restoring them. Read up on the rsync command and do your own. If you need help with that it would be best to post another question.

Good luck.
 
U changed Permison of root partion to 740..so i think u will have to chmod again / ..and its can be done from ur hosting provider try to contact them..

i am not sure..
 

Members online


Top