Koozali.org: home of the SME Server

chown admin:root /home

Offline HomePlayer

  • ***
  • 55
  • +0/-0
chown admin:root /home
« on: June 10, 2008, 12:23:03 PM »
Oops,

Help needed.

i needed to chown some files in /home/e-smith/files/users/admin/home/
i was working in this dir  /home/e-smith/files/users/admin

so i did a chown -R admin:root /home
Stupid me it had to bin "chown -R admin:root /home/e-smith/files/users/admin/home"

and now it happend, all files and dir's in the root /home got admin:root

I needed only the files and dir's in /home/e-smith/files/users/admin

pls is a reinstall the only option or can some things be fixed...

If a reinstall is needed.
- can I use one of my raid disks (stop it from being in the raid, format it ext3, and copy data to it)
- Unplug this HD, reinstall SME 7.3 on the anther disk - configure sme users ibays.
- Power-off plug in the backup HD, power on mount copy and most likely chown some file's
- check recheck every thing, and build the raid.
« Last Edit: June 10, 2008, 12:40:02 PM by HomePlayer »

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: chown admin:root /home
« Reply #1 on: June 10, 2008, 06:53:17 PM »
i needed to chown some files in /home/e-smith/files/users/admin/home/
i was working in this dir  /home/e-smith/files/users/admin
I hope your cat was walking across your keyboard and that you did not make the mistake yourself... I keep wondering why people keep chown-ing files so carelessly?

Most of the /home/e-smith tree should be root:root AFAIK, with the only exception being the user home drives they should be user:user for each individual user, but I remember some folders being set to admin:admin as well.

Mind you this is a rough sketch as I am not sure if they fully cover all permissions and exceptions...
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 HomePlayer

  • ***
  • 55
  • +0/-0
Re: chown admin:root /home
« Reply #2 on: June 10, 2008, 07:49:14 PM »
your correct indeed,
nope there was not a cat, of any kind.

well i am seting up a VM machine to find the right settings. I think it is easyer to set it back, instad of reinstall.

I keep wondering why people keep chown-ing files so carelessly?
To bad that you dont give a tip to avoid things like this

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: chown admin:root /home
« Reply #3 on: June 10, 2008, 08:00:35 PM »
well i am seting up a VM machine to find the right settings. I think it is easyer to set it back, instad of reinstall.
That might be the quickest solution, but be carefull not to make a typo again ;-)

To bad that you dont give a tip to avoid things like this
I don't know of any tips preventing this, but I have used it very rarely the last five SME Server years. Furthermore I always  check and double check such syntaxes when issuing such commands on other systems, especially when I am setting them recursively. Most of the times I navigate to the top level of the tree I want to chmod/chown to prevent mistakes propagating down the tree like in your case. Perhaps another option is to use midnight commander for such tasks.

Hopefully you may find help in the tips above.
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 CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: chown admin:root /home
« Reply #4 on: June 10, 2008, 10:49:22 PM »
To bad that you dont give a tip to avoid things like this

Actually, the fully functional server manager is provided so that users don't ever need to chown anything.

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: chown admin:root /home
« Reply #5 on: June 10, 2008, 10:50:23 PM »
i needed to chown some files in /home/e-smith/files/users/admin/home/

Why?

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: chown admin:root /home
« Reply #6 on: June 10, 2008, 10:56:46 PM »
Actually, the fully functional server manager is provided so that users don't ever need to chown anything.
I know :-), that is why I (almost) never need to do modification like such on the CLI.
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 HomePlayer

  • ***
  • 55
  • +0/-0
Re: chown admin:root /home
« Reply #7 on: June 11, 2008, 08:20:10 AM »
I navigate to the top level of the tree I want to chmod/chown to prevent mistakes propagating down the tree like in your case. Perhaps another option is to use midnight commander for such tasks.

Hopefully you may find help in the tips above.
good one,

i had to chown some files, els i good not get to them, wrong permision. it got late last nite working from home to set things back.
I'll be of to work now. to see if i got all things write ;-)

thanks for all the replays

Offline 7eis

  • *
  • 47
  • +0/-0
Re: chown admin:root /home
« Reply #8 on: June 16, 2008, 09:50:48 PM »
If you need to do this on a regular basis (same dirs of cause), just throw them lines into a file in your homedir and chmod is a+x. then issue ./chmodninjascript.

Works for me. Hope you solved your problem - make sure to document everything! :-)

Offline HomePlayer

  • ***
  • 55
  • +0/-0
Re: chown admin:root /home
« Reply #9 on: June 17, 2008, 09:47:25 AM »
yeah, thanks 7Eis, thats a very smart idea indeed

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: chown admin:root /home
« Reply #10 on: June 17, 2008, 06:39:53 PM »
If you need to do this on a regular basis (same dirs of cause)
Then you are doing something wrong as you should rarely, if not never, need these sort of commands on SME Server as Charlie already stated earlier in this thread.
Perhaps you could elaborate on why you need these commands for the same set of files and/or folders on a regular basis.
« Last Edit: June 17, 2008, 06:41:53 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 HomePlayer

  • ***
  • 55
  • +0/-0
Re: chown admin:root /home
« Reply #11 on: June 19, 2008, 03:29:03 PM »
Oke Catus,

whit putty i did copy a dir from one of the user/home dirs to admin/home from windows i could not get into this dir user1:user1