Need help with owners and permissions at root.

79 views
Skip to first unread message

Peter Read

unread,
Nov 29, 2013, 6:35:56 PM11/29/13
to al...@googlegroups.com
Hi all, 

Had a slight mishap with a script this week and need some help putting back my permissions and owners in my Alt-F installation on a DNS-323. All my permissions and owners were overwritten at root and I want to correct them back again. I'll probably need to do this manually but hey, that's the price you pay for screw up right? Here's what I have right now:

# ls -l
total 32
-rwxrwxrwx    1 root     All          17987 Sep 25  2010 COPYING
-rwxrwxrwx    1 root     All            245 Sep 25  2010 LICENCE
lrwxrwxrwx    1 root     root            16 Nov  3 19:18 Public -> /mnt/sda2/Public
drwxrwxrwx    2 root     All             40 Mar 23  2013 bin
drwxrwxrwx    2 root     All             40 Mar 18  2013 boot
drwxrwxrwx    3 root     All           1520 Nov  3 19:18 dev
drwxrwxrwx   15 root     All            760 Nov 21 21:29 etc
lrwxrwxrwx    1 root     root            15 Nov  3 19:18 home -> /mnt/sda2/Users
-rwxrwxrwx    1 root     All           4433 Feb 26  2013 init
drwxrwxrwx    2 root     All             40 Mar 23  2013 lib
drwxrwxrwx    4 root     All             80 Nov  3 19:18 mnt
drwxrwxrwx   60 root     All              0 Jan  1  1970 proc
drwxrwxrwx    2 root     All             60 Nov 12 22:20 root
drwxrwxrwx    4 root     All             80 Nov  3 19:18 rootmnt
drwxrwxrwx    2 root     All            520 Nov  3 19:18 sbin
drwxrwxrwx   11 root     All              0 Nov 29 09:25 sys
drwxrwxrwx    7 root     All            200 Nov 21 21:29 tmp
drwxrwxrwx    9 root     All             60 Mar 23  2013 usr
drwxrwxrwx    5 root     All            140 Nov  3 19:18 var

Hoping someone can help my out here but giving me a snapshot of what they have so I can compare and correct accordingly.

Many thanks

João Cardoso

unread,
Nov 30, 2013, 11:03:12 AM11/30/13
to al...@googlegroups.com
You can find the correct ownership and permissions for all files from  /rootmnt/ro/, which is where the base firmware is mounted in a read-only mode.
For the users home folders, the best is to create a new dummy user and watch its permissions; you can recover the other users uid/gid from /etc/passwd and /etc/group, e.g.
drwxr-xr-x    3 jcard    users         1024 Nov 27 15:14 Joao Cardoso

Other folders:

drwxr-xr-x    5 root     root          1024 May 29  2011 Users
drwxr-xr-x    4 root     root          1024 May 25  2011 Public
drwxr-xr-x    2 root     root          1024 Nov 27 15:55 RO
drwxrwxrwx    2 nobody   nobody        1024 May 25  2011 RW

As you don't seem to have packages installed, I think that's all.
And not having Alt-F packages installed means that all changes you made will disappear after the next reboot (except configuration files changes saved through "save settings" and, of course all disk resident files)


Many thanks
Reply all
Reply to author
Forward
0 new messages