#1  
Old 16th February 2007, 11:35
nox171 nox171 is offline
Member
 
Join Date: Dec 2006
Posts: 54
Thanks: 0
Thanked 0 Times in 0 Posts
Default Wrong chmod!!

Hi everybody,

I'm a little bit in trouble guys!
I was changing permission on a folder to compleate an installation (joomla)
I type in this command:
chown -R -v -f web22_xxxxx:web22 /*
In this way I changed a lot of files and folder permissions!!
I would like to change only the permission on 1 specific folder (the web folder).
I'm not a linux expert, I'm only trying to do the best of myself...

By the way when I realized that the command was wrong it was to late!!
The command run only for few seconds but now I can't log on my ISPConfig admin console!
I receive this error:
Code:
Warning: include(../lib/config.inc.php) [function.include]: failed to open stream: Permission denied in /home/admispconfig/ispconfig/web/login.php on line 30

Warning: include() [function.include]: Failed opening '../lib/config.inc.php' for inclusion (include_path='.:') in /home/admispconfig/ispconfig/web/login.php on line 30

Warning: require_once(login/lib/lang/.lng) [function.require-once]: failed to open stream: No such file or directory in /home/admispconfig/ispconfig/web/login.php on line 31

Fatal error: require_once() [function.require]: Failed opening required 'login/lib/lang/.lng' (include_path='.:') in /home/admispconfig/ispconfig/web/login.php on line 31
The only modified folders that I can see in the console (putty) are with this path

changed ownership of `/home/admispconfig/ispconfig/web/phpmyadmin/themes/original/img/b_lastpage.png' to web22_xxxxxx:web22


Do you know if exists an easy way to go back??
I really don't know what I can do!

Please help,
Thanks

/nox
Reply With Quote
Sponsored Links
  #2  
Old 16th February 2007, 11:37
martinfst martinfst is offline
Senior Member
 
Join Date: Dec 2006
Location: Hilversum, The Netherlands
Posts: 880
Thanks: 1
Thanked 18 Times in 17 Posts
Send a message via MSN to martinfst Send a message via Skype™ to martinfst
Default

Quote:
chown -R -v -f web22_xxxxx:web22 /*
This effectively started your command from the top level root directory. Everything is now changed. There is almost no way to recover except a complete reinstall. Sorry.
Reply With Quote
  #3  
Old 16th February 2007, 11:41
nox171 nox171 is offline
Member
 
Join Date: Dec 2006
Posts: 54
Thanks: 0
Thanked 0 Times in 0 Posts
Default

But,
do you know in which way it start to edit the permission?
Starting in alphabetic order or something like that?

I have another server that have the same installation.
Perhaps I can try to change again the permission one by one spotting them on the other server.
The problem is that I need to know where to start...

Also can you tell me the right command to edit the permission on one specific folder?

Thanks
Reply With Quote
  #4  
Old 16th February 2007, 11:41
alexillsley alexillsley is offline
Senior Member
 
Join Date: Dec 2006
Posts: 396
Thanks: 27
Thanked 4 Times in 4 Posts
Default

You could try setting the owner to root, do know if it would work
Reply With Quote
  #5  
Old 16th February 2007, 11:44
nox171 nox171 is offline
Member
 
Join Date: Dec 2006
Posts: 54
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I would try to recover the situation... not destroy everything... Actually i wouldn't like to re-install again!
Reply With Quote
  #6  
Old 16th February 2007, 11:50
nox171 nox171 is offline
Member
 
Join Date: Dec 2006
Posts: 54
Thanks: 0
Thanked 0 Times in 0 Posts
Default

ok...
looking to the other server I can see the folders where I've changed the permission.

Now I'd like to know the right command to edit permission...

Thanks!!!
Reply With Quote
  #7  
Old 16th February 2007, 12:02
martinfst martinfst is offline
Senior Member
 
Join Date: Dec 2006
Location: Hilversum, The Netherlands
Posts: 880
Thanks: 1
Thanked 18 Times in 17 Posts
Send a message via MSN to martinfst Send a message via Skype™ to martinfst
Default

chown normally starts with the lowest numbered i-node. See this as a unique identifier. The way i-nodes are numbered differ from system to system, even if you use the same installation/distro.

If you want to compare everything manually, open three ssh sessions, one to your working system (system A), two to your corrupted system (system B). Type
Code:
cd /
ls -al | less
on screen of system A and one screen of system B. Compare each and every line. On the second screen of system B, use
Code:
chown right_user.right_group <full file name>
to set the owner/group correctly.
Do all this as user 'root'. Be prepared to work on this for about two days, depending how much you installed.
Reply With Quote
  #8  
Old 16th February 2007, 12:15
nox171 nox171 is offline
Member
 
Join Date: Dec 2006
Posts: 54
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Right thanks
I've just started.

I found something like that:
Code:
server1:/bin # chown root:root /bin/*
server1:/bin # ls -la
total 6224
drwxr-xr-x   2 root            root     4096 Dec 10 20:23 .
drwxr-xr-x  20 root            root     4096 Jul 17  2006 ..
-rwxr-xr-x   1 root            root     3472 Sep 13  2005 arch
-rwxr-xr-x   1 root            root   110912 Sep  9  2005 ash
-rwxr-xr-x   1 root            root   584652 Sep  9  2005 ash.static
lrwxrwxrwx   1 web22_xxxxxxx web22       4 Jul  6  2006 awk -> gawk
-rwxr-xr-x   1 root            root    15168 Jan 31  2006 basename
-rwxr-xr-x   1 root            root   490716 Sep  9  2005 bash
-rwxr-xr-x   1 root            root    19220 Jan 31  2006 cat
-rwxr-xr-x   1 root            root    37020 Jan 31  2006 chgrp
-rwxr-xr-x   1 root            root    36044 Jan 31  2006 chmod
-rwxr-xr-x   1 root            root    40284 Jan 31  2006 chown
-rwxr-xr-x   1 root            root     5000 Sep  9  2005 chvt
-rwxr-xr-x   1 root            root    61548 Jan 31  2006 cp
-rwxr-xr-x   1 root            root   100480 Apr 27  2006 cpio
lrwxrwxrwx   1 web22_xxxxxxx web22       4 Jul  9  2006 csh -> tcsh
-rwxr-xr-x   1 root            root    47368 Jan 31  2006 date
-rwxr-xr-x   1 root            root    44748 Jan 31  2006 dd
-rwxr-xr-x   1 root            root     5472 Sep  9  2005 deallocvt
-rwxr-xr-x   1 root            root    38696 Jan 31  2006 df
-rwxr-xr-x   1 root            root     5140 Sep 13  2005 dmesg
lrwxrwxrwx   1 web22_xxxxxxx web22       8 Jul  6  2006 dnsdomainname -> hostname
lrwxrwxrwx 1 web22_xxxxxx web22 4 Jul 6 2006 sh -> bash

using this command:
Code:
chown root:root /bin/*
As you can see that folders whit this symbol ->, (are them folders? ) don't change the permission to root...

Do you know why?
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Wrong quota messages Bruce General 10 15th September 2010 15:44
1st time install-entered wrong MySQL data deneb Installation/Configuration 2 7th February 2007 18:55
Joomla & MySql config and chmod permissions normdouglas Installation/Configuration 6 27th December 2006 12:39
Chmod webmail ISPConfig vbhubeny General 1 26th November 2006 15:28
gpar2, installed wrong package help please lizard_king825 Installation/Configuration 11 2nd November 2006 15:22


All times are GMT +2. The time now is 00:50.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.