Search Members Help

» Welcome Guest
[ Log In :: Register ]

Mini-ITX Boards Sale, Fanless BareBones Mini-ITX, Bootable 1G DSL USBs, 533MHz Fanless PC <-- SALE $200 each!
Get The Official Damn Small Linux Book. DSL Market , Great VPS hosting provided by Tektonic
Pages: (3) </ [1] 2 3 >/

[ Track this topic :: Email this topic :: Print this topic ]

reply to topic new topic new poll
Topic: chown in persistent home, seems to happen every boot< Next Oldest | Next Newest >
mikshaw Offline





Group: Members
Posts: 4856
Joined: July 2004
Posted: April 22 2008,12:41 QUOTE

/etc/init.d/dsl-config, line 267:
Code Sample
   260          if [ -d "/mnt/$MYHOME$HOME" ]; then
   261             mount --bind "/mnt/$MYHOME$HOME" "$HOME/"
   262          else
   263             mkdir -p "/mnt/$MYHOME$HOME"
   264             mount --bind "/mnt/$MYHOME$HOME" "$HOME/"
   265             tar -C /KNOPPIX/etc/skel -cf - . | tar -C "$HOME" -xf -
   266             printf 'wm: %s\nicons: %s\n' "$DESKTOP" "$ICONS" > "$HOME"/.desktop
   267             chown -Rh "$USER".staff "$HOME"
   268          fi


To me this looks like chown occurs only if the home directory does not already exist, but for some reason it seems to happen every time I boot.  I had a suspicion this was happening, but never actually looked into it until this morning.  Everything in my home directory is dsl.staff, even though I know positively that yesterday it wasn't.

I keep all my work files, including mydsl extensions, in a persistent home. Every time I package an extension I have to chown the files even if I'd already done it last time i worked on that project.  If I'm currently working on an extension and compress it to test, if I shut down, go to bed, and then decide I need to make a change the next day, I have to chown the files all over again.

It's not just the extensions, though. I also have a peculiar way of doing a partially persistent /root. Some of root's configuration files are linked to or copied from files in a subdirectory of /home/dsl, and they should belong to root. There are also a couple of system files that are copied from a subdirectory in home. This is done from bootlocal, so I can always chown them after the copy, but I shouldn't need to do this.

So....is this happening to anyone else with a persistent home?
My boot options:
root=/dev/hda3 vga=791 knoppix_name=KNOPPIX-4.2.3 dsl syslog legacy noswap noacpi noapm dma noscsi frugal home=hda4 mydsl=hda4/home/dsl/mydsl host=bungle

Perhaps there's a conflict with using mydsl inside home?

In any case, it doesn't seem like I'm doing anything technically wrong, so this might be considered a bug report, or at least a suggestion of something to look into.


--------------
http://www.tldp.org/LDP/intro-linux/html/index.html
Back to top
Profile PM WEB 
lucky13 Offline





Group: Members
Posts: 1478
Joined: Feb. 2007
Posted: April 22 2008,12:57 QUOTE

Isn't this one of the changes made to accommodate the user cheatcode?

Edit: Why not change it to:
Code Sample
chown -Rh 1000:1000 "$HOME"

so that ownership doesn't change based on names of user.group?


--------------
"It felt kind of like having a pitbull terrier on my rear end."
-- meo (copyright(c)2008, all rights reserved)
Back to top
Profile PM WEB 
mikshaw Offline





Group: Members
Posts: 4856
Joined: July 2004
Posted: April 22 2008,15:35 QUOTE

That would require a remaster, wouldn't it?
But I am interested in knowing what difference 1000:1000 has. Is that a special uid/gid?

In any case, there shouldn't be a chown of any kind on a persistent directory once the directory has been set up and chowned the first time. If you change user and have the same partition for a persistent home, the home directory wouldn't be the same as the previous one anyway, so the user boot option should not have any influence on file ownership after the first boot.

Maybe I'm missing some vital information.  As I said above, the script looks to me like it should already be doing this properly, but for some reason all files in /home/dsl always end up dsl.staff every time I reboot.  I've also seen times when I'd get messages saying that the system couldn't change ownership of certain files in /home/dsl, which was the first time I noticed the autochown.

Fortunately -h was included, or I'd be seriously pissed =o)


--------------
http://www.tldp.org/LDP/intro-linux/html/index.html
Back to top
Profile PM WEB 
^thehatsrule^ Offline





Group: Members
Posts: 3275
Joined: July 2006
Posted: April 22 2008,17:16 QUOTE

Quote
But I am interested in knowing what difference 1000:1000 has. Is that a special uid/gid?
iirc I've seen most interactive user id/groups start at 1000.  So since the default (first) is dsl.staff, it is 1000:1000.  LSB says it can start at 500: http://refspecs.freestandards.org/LSB_3.2....ge.html
Back to top
Profile PM 
lucky13 Offline





Group: Members
Posts: 1478
Joined: Feb. 2007
Posted: April 22 2008,17:17 QUOTE

If it's set on numerical ownership, it doesn't matter if you're user dsl or user mikshaw or user foo. It wouldn't need to be remastered if Robert changes the script.

--------------
"It felt kind of like having a pitbull terrier on my rear end."
-- meo (copyright(c)2008, all rights reserved)
Back to top
Profile PM WEB 
14 replies since April 22 2008,12:41 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

Pages: (3) </ [1] 2 3 >/
reply to topic new topic new poll
Quick Reply: chown in persistent home

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code