Koozali.org: home of the SME Server

Root directory files with wrong permissions, how to correct?

Offline josempinto

  • **
  • 24
  • +0/-0
Root directory files with wrong permissions, how to correct?
« on: April 30, 2008, 06:49:33 PM »
Root directory files with wrong permissions, how to correct?

Dear friends,

I Am sure that I messed up a SME in production and working server with the command chmood -R * 777
I wanted to do this on the files on a single directory, but on that directory tree was a symbolic link to the root directory, and the command fallowed the link and satarted  working on the root directory and so on. When I interrupted de command it was too late
The files are all there, bad now the permissions are wrong.
After a reboot I cannot (even) logon on the console. It seams to be logging, but returns me to the (ask password) prompt.
Tried with SME install CD, a reinstall (without losing the old installation files- this means - selected upgrade), but it not soved the problem.
Does anyone, a guru, anyone of the development team,... have a hint, and tell me the exact command, I think using the installation CD, that could restore the system files, or at lest, it's original permissions (I only nedd to do this)?

Thank you, in advance.
« Last Edit: May 05, 2008, 10:39:34 AM by josempinto »

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: Root directory files with wrong permissions, how to correct?
« Reply #1 on: April 30, 2008, 07:18:49 PM »
I um sure that I messed up a SME in production and working server with the command chmood -R * 777
I find it hard to believe that a permission of 777 is causing you failed logins as 777 means read, write and modify access to all users and groups in the system. Are you sure you did not do anything else? Are you sure you did not do a chown -R 777?

It is hard to set back the proper permission of every file. If you do not have a backup, I think you need to reinstall from scratch.
« Last Edit: April 30, 2008, 07:21:19 PM by cactus »
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline josempinto

  • **
  • 24
  • +0/-0
Re: Root directory files with wrong permissions, how to correct?
« Reply #2 on: April 30, 2008, 07:26:09 PM »
I find it hard to believe that a permission of 777 is causing you failed logins as 777 means read, write and modify access to all users and groups in the system. Are you sure you did not do anything else?

It is hard to set back the proper permission of every file. If you do not have a backup, I think you need to reinstall from scratch.

  I am shure! Try this on a server, and you will see:

  cd /

  chmod -R * 777

  reboot
   ....
  ????


« Last Edit: May 05, 2008, 10:34:28 AM by josempinto »

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: Root directory files with wrong permissions, how to correct?
« Reply #3 on: April 30, 2008, 07:28:54 PM »
Just to say, thak I thank-you four your fast reply, I really ned a fast reply! To solve this as soon as possible!

 But Before answ. you, I would prefer to have/read some other peoople answ./tips. OK? Please! Thanks!

  PS: I am shure! Try this on a server, and you will see:
  cd /
  chmod -R * 777
  reboot
   ....
  ????
I have a hard time following your reply. I asked you a question which you do not seem to answer.

I did not post a tip... Please do not execute the chmod -R command, I asked if you posted the correct command here as I suspect you did use chown where you mentioned chmod in your opening post. So once again: are you sure you issed chmod -R 777? Are your sure you did not perhaps issue chown -R 777?
« Last Edit: April 30, 2008, 07:30:47 PM by cactus »
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline byte

  • *
  • 2,183
  • +2/-0
Re: Root directory files with wrong permissions, how to correct?
« Reply #4 on: April 30, 2008, 07:41:41 PM »
I um sure that I messed up a SME in production and working server with the command chmood -R * 777
I wanted to do this on the files on a single directory, but on that directory tree was a symbolic link to the root directory, and the command fallowed the link and satarted  working on the root directory and so on. When I interrupted de command it was too late
The files are all there, bad now the permissions are wrong.

Why did you do this on a production server ? Why did you think the files (what files are you referring too ?? ) were wrong ???

Quote
Does anyone, a guru, anyone of the development team,... have a hint, [..]

I can give you a hint...please take time to read the manual:

http://wiki.contribs.org/SME_Server:Documentation

Make sure you read it twice over to fully understand the way the SME Server works then if you still have questions please feel free to post them here, as I've seen some other threads in which it appears you may have missed the manual. Thanks.
--[byte]--

Have you filled in a Bug Report over @ http://bugs.contribs.org ? Please don't wait to be told this way you help us to help you/others - Thanks!

Offline josempinto

  • **
  • 24
  • +0/-0
Re: Root directory files with wrong permissions, how to correct?
« Reply #5 on: April 30, 2008, 07:48:18 PM »
.
« Last Edit: May 05, 2008, 10:33:44 AM by josempinto »

Offline josempinto

  • **
  • 24
  • +0/-0
Re: Root directory files with wrong permissions, how to correct?
« Reply #6 on: May 05, 2008, 10:38:42 AM »

I can give you a hint...please take time to read the manual:

http://wiki.contribs.org/SME_Server:Documentation




 You have redirected me to read a file with hundreds, if not thousands of lines.
 Can you please tell me the exact line, where is the solution for my problem? Thanks in advance!

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: Root directory files with wrong permissions, how to correct?
« Reply #7 on: May 05, 2008, 10:50:12 AM »


 You have redirected me to read a file with hundreds, if not thousands of lines.
 Can you please tell me the exact line, where is the solution for my problem? Thanks in advance!

Most likely no one can tell you as there are a lot of files on every server and it is a tedious task to list all rights and permissions and then set them to the files on the other server.

You should not have been tampering with your server like you did. I, and perhaps others like byte, get the opinion that you do not have to much knowledge about SME Server or linux. I guess that is why he directed you to the manual, I suggest you follow his advice.

The only way to get the server running again might be to insert the CD and try the upgrade option. It might (partially) restore functionality, but I think the best solution is to reinstall.
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline josempinto

  • **
  • 24
  • +0/-0
Re: Root directory files with wrong permissions, how to correct?
« Reply #8 on: May 05, 2008, 12:11:27 PM »
Quote
.

Here are more details:

After reboot, I get on the console, the fallowing massage, constantly rolling on:

“Insecure Directory in $ENV{PATH} while running with –T switch at /usr/lib/perl5/site_perl/esmith/console.pm line 97”

Access to server by network, nothing, seams dead (no page, no FTP prompt, No login Prompt)

Local Access (console login):
User Admin:
Login:
Password:
Simulates Logging - but returns to:
Login:
Password:


User Root:
Login:
Password:
Login Incorrect
Login:
Password:




Offline josempinto

  • **
  • 24
  • +0/-0
Re: Root directory files with wrong permissions, how to correct?
« Reply #9 on: May 05, 2008, 12:17:05 PM »

The only way to get the server running again might be to insert the CD and try the upgrade option. It might (partially) restore functionality, but I think the best solution is to reinstall.


 Please do not forget to read , what I said on my first and original question/Post:

Quote
Tried with SME install CD, a reinstall (without losing the old installation files- this means - selected upgrade), but it not soved the problem.

I dare, if SME does not have a tool nor a way to recover a system, without losing the user files… For instance MS as this on their windows install CDs, and some other linuxes have too…

Thanks
« Last Edit: May 05, 2008, 12:44:37 PM by josempinto »

Offline josempinto

  • **
  • 24
  • +0/-0
Re: Root directory files with wrong permissions, how to correct?
« Reply #10 on: May 05, 2008, 12:34:55 PM »
Why did you do this on a production server ? Why did you think the files (what files are you referring too ?? ) were wrong ???




OK, you asked for it… so Don’t tell me that I am aggressive:
How many reasons to do that do you want?

I can give you more than 3, is that enough?:

1-   Because, as the name of SME stands for, SME is for Small and medium Enterprises, if you want, we are a small, very small enterprise, so we do not afford money to have a poll of servers, so we only have this on the production server.
2-   Because this command does not deletes files, if I were issuing for instance a remove, delete, or even move command, so I would check and recheck, You can be sure that I would check and recheck the command before hitting enter.
3-   I um used to use this command on several lin*s, with no problem, as everybody knows, it only changes file permissions, not even changes its owner, nor deletes... (Now I could tell a lot of things, but to not be aggressive, I will STOP!)

Quote
I wanted to do this on the files on a single directory, but on that directory tree was a symbolic link to the root directory, and the command fallowed the link and satarted  working on the root directory and so on. When I interrupted de command it was too late


4-   As I said (read my first post!. I issued the command on a directory, not on the root directory. I didn’t dare that: 1- There were in the way, a symbolic link to ROOT directory, 2- this command on SME server fallows symbolic links.


Finally, I dare, if SME does not have a tool nor a way to recover a system, without losing the user files… For instance MS as this on their windows install CDs, and some other linu*s have too…
A reinstall of de operating system files, should work, and allow-me, in the worst case, recover back the user files, and later on, if nothing else works… reinstall everything from the ground.


« Last Edit: May 05, 2008, 12:41:28 PM by josempinto »

Offline josempinto

  • **
  • 24
  • +0/-0
Re: Root directory files with wrong permissions, how to correct?
« Reply #11 on: May 05, 2008, 12:50:36 PM »
I find it hard to believe that a permission of 777 is causing you failed logins as 777 means read, write and modify access to all users and groups in the system. Are you sure you did not do anything else? Are you sure you did not do a chown -R 777?

It is hard to set back the proper permission of every file. If you do not have a backup, I think you need to reinstall from scratch.

For me It's hard to believe TOO, that SME cold get confused with a command like this one, and In addition, that on the install CD does not have a tool nor a way to recover a system, without losing the user files… For instance MS as this on their windows install CDs, and some other linu*s have too…
A reinstall of de operating system files, should work, and allow-me, in the worst case, recover back the user files, and later on, if nothing else works… reinstall everything from the ground.

But you can believe, It is, true!!!


Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: Root directory files with wrong permissions, how to correct?
« Reply #12 on: May 05, 2008, 12:51:05 PM »
Finally, I dare, if SME does not have a tool nor a way to recover a system, without losing the user files… For instance MS as this on their windows install CDs, and some other linu*s have too…
It has it is the reinstall/upgrade option you tried but that did not work out in your case.

A reinstall of de operating system files, should work, and allow-me, in the worst case, recover back the user files, and later on, if nothing else works… reinstall everything from the ground.
A re-install will not allow you to restore as it will overwrite all data on your harddisk. I suggest you start using a decent backup method as this will make restore in cases of severe errors/problems like you are suffering a lot easier.

Next time take better care of parameters when running the command as the man pages of the chmod command clearly state that the command might follow symlinks when using the -R tag.

I am still wondering why you configured your system in such a strange way that you have a symlink on your system exposing the complete root tree somewhere else on your file system as well as using the chmod command which I (almost) never have to use on SME Server.

I suggest you reinstall your server and restore (perhaps from backup) as none of the (other) guru's have been able to supply you with a method in the mean time. If you do not have a backup routine I suggest you browse the wiki and choose one.

OK, you asked for it… so Don’t tell me that I am aggressive:
How many reasons to do that do you want?
A last suggestion when asking for help is to, even when the problem is urging to you, keep a friendly tone in your conversation to invite people to answer your questions, instead of scaring them away and leaving you out there with your problems, in this thread, IMHO, I also sense a quite aggressive tone in your writing.
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline josempinto

  • **
  • 24
  • +0/-0
Re: Root directory files with wrong permissions, how to correct?
« Reply #13 on: May 05, 2008, 01:03:11 PM »
I find it hard to believe that a permission of 777 is causing you failed logins as 777 means read, write and modify access to all users and groups in the system. Are you sure you did not do anything else? Are you sure you did not do a chown -R 777?

It is hard to set back the proper permission of every file. If you do not have a backup, I think you need to reinstall from scratch.

I quite sure, that the command was “chmod -R 777 *”, (correction, there was a mistake am my first post, - but I think that everybody…)
But, les suppose, just to… that the command was what you said,
Tell me, please, the commands that I must type now, to be able so see that now, how can  now I log on to see what you ask for?


Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: Root directory files with wrong permissions, how to correct?
« Reply #14 on: May 05, 2008, 01:29:35 PM »
I quite sure, that the command was “chmod -R 777 *”, (correction, there was a mistake am my first post, - but I think that everybody…)
But, les suppose, just to… that the command was what you said,
Tell me, please, the commands that I must type now, to be able so see that now, how can  now I log on to see what you ask for?
If you are able to login you can issue the history command to see what you entered on the CLI, if you are not able to login I advice you to reread my previous post!
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)