On Fri, 15 Mar 2013 09:19:11 -0700
Rogan Creswick <[email protected]> wrote:

> On Fri, Mar 15, 2013 at 8:59 AM, John Jason Jordan
> <[email protected]>wrote:
> 
> >
> > The permissions for all folders and files on the disk are
> > drwxr-xr-x. I could try chown again, but I am wondering if I messed
> > up when I did that on the other computer. I am jjj:jjj on both
> > computers. There is also a 2 GB SD card mounted on the laptop
> > (0123-4567), and from the command line I get:
> >
> 
> I /think/ I know what's going on, but bear with me for a bit of
> background first.
> 
> The user name "jjj" and group name "jjj" are not really related to the
> permissions on the drive.  They're really just convenient aliases for
> uid and gid's, which are the numbers you see on the machine where the
> drive isn't working.
> 
> When you run ls -la, the current computer looks up the numbers
> (probably in /usr/passwd and /usr/group, or something similar) and if
> there are entries in there, then it prints the name (eg: jjj) instead
> of the number.
> 
> Now, it looks like your desktop computer has "jjj" associated with uid
> 1000, and gid 1000, but your laptop has jjj associated with a
> different uid / gid pair. (strictly speaking the uid and gid are
> mapped to *different* "jjj" names, but that doesn't really matter for
> this situation).
> 
> You could probably make this problem go away by setting the same
> UID / GID for jjj on each computer (eg: changing the laptop to map
> jjj to 1000 for uid / gid).
> 
> *However* that is much easier said than done.  Someone else on here
> may know a way to go about that, but the thought makes me nervous. In
> ye good olde days of Linux, you could "just" make sure the new ID on
> your (1000,1000) is unused (but, it probably is /not/ unused), and
> then change all the permissions from jjj:jjj to 1000:1000 (and all
> permutations, since the user may own things the group doesn't and
> etc...).
> 
> Now, I'm not so certain it's that simple.  I don't trust the close
> coupling between applications, interfaces, settings daemons, etc...
> to treat the linux permissions system as a black box.  There may well
> be UID/GIDs tucked away in other locations now.
> 
> --Rogan

This is a mis-match between Red Hat/Fedora and Debian/*buntu.  Red Hat
has, for a very long time, reserved UID/GID numbers below 500 for
system accounts.  Debian, on the other hand, reserved numbers below
1000.  My advice would be to change your UID/GID numbers on your
Fedora box to 1000:1000.  It doesn't matter if you upgrade to F17+, or
switch to another Ubuntu version, you'll need to do this.  Red Hat
recently came to the conclusion that there too many system programs that
required IDs to fit into the system space. So, as of F17, all the
standard user UID/GID numbers start with 1000.

Changing the IDs in my home directory wasn't hard, but there were a
number of files in odd places that needed to be changed.  I found the
find program to be very helpful (no pun intended).  Plus I had to
change my ID numbers in the system password files.  Again, no real
problem, but it's best to use the command line.

> >
> > [jjj@Devil8 media]$ ls -la
> > total 12
> > drwxr-xr-x   4 root root  100 Mar 15 08:20 .
> > drwxr-xr-x. 30 root root 4096 Nov 17 08:00 ..
> > drwx------   3 jjj  jjj  4096 Dec 31  1969 0123-4567
> > -rw-------   1 root root    0 Mar 13 20:05 .hal-mtab-lock
> > drwxr-xr-x  10 1000 1000 4096 Mar 14 22:43 Movies

If I remember correctly, the column of numbers between the
permissions and the user name/number is the size of the directory.
Not something you need to worry about here.  The existence of the
".hal-mtab-lock" file is troubling; I don't think it should be
there.  It was probably created when you plugged your drive into
your desktop machine.  Normally, it would be deleted when you
dismounted the drive, but in this case, the drive wasn't properly
dismounted.  I would just delete that file.  Be sure that the lock
file is *that* lock file.  If you plug it in to your desktop
again, it may overwrite it with a new one.  OTOH, Fedora has recently
dropped HAL completely in favor of udisks.

Anyway, I hope this helps.

--Dale

--
Bring on the lightning!  We'll build a monster for fun!
Bring on the lightning!  We'll turn him loose when we're done!
It's very frightening -- See how the villagers run!
Pull that switch and catch the lightning -- Before the storm is done!
  -- from "Girl Genius," sung to the tune of the "Beer Barrel Polka"
_______________________________________________
PLUG mailing list
[email protected]
http://lists.pdxlinux.org/mailman/listinfo/plug

Reply via email to